mirror of
https://gitee.com/openharmony/third_party_rust_quote
synced 2024-11-27 01:11:38 +00:00
Avoid distracting extra error message in wrong-type-span test case
This commit is contained in:
parent
711a570bf1
commit
0e1e351a61
@ -2,6 +2,6 @@ use quote::quote_spanned;
|
||||
|
||||
fn main() {
|
||||
let span = "";
|
||||
let x = 0;
|
||||
let x = 0i32;
|
||||
quote_spanned!(span=> #x);
|
||||
}
|
||||
|
@ -6,24 +6,3 @@ error[E0308]: mismatched types
|
||||
| | |
|
||||
| | expected struct `Span`, found `&str`
|
||||
| expected due to this
|
||||
|
||||
error[E0283]: type annotations needed for `{integer}`
|
||||
--> tests/ui/wrong-type-span.rs:6:5
|
||||
|
|
||||
5 | let x = 0;
|
||||
| - consider giving `x` a type
|
||||
6 | quote_spanned!(span=> #x);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type `{integer}`
|
||||
|
|
||||
= note: multiple `impl`s satisfying `{integer}: ToTokens` found in the `quote` crate:
|
||||
- impl ToTokens for i128;
|
||||
- impl ToTokens for i16;
|
||||
- impl ToTokens for i32;
|
||||
- impl ToTokens for i64;
|
||||
and 8 more
|
||||
note: required by `to_tokens`
|
||||
--> src/to_tokens.rs:55:5
|
||||
|
|
||||
55 | fn to_tokens(&self, tokens: &mut TokenStream);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the macro `$crate::quote_token_with_context_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
Loading…
Reference in New Issue
Block a user