mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-23 16:00:10 +00:00
Update tokenstream whitespace for proc-macro2 1.0.20
This commit is contained in:
parent
aad8e4b431
commit
ec38881e57
@ -46,7 +46,7 @@ fn test_struct() {
|
||||
},
|
||||
],
|
||||
},
|
||||
tokens: TokenStream(`( Debug , Clone )`),
|
||||
tokens: TokenStream(`(Debug , Clone)`),
|
||||
},
|
||||
],
|
||||
vis: Visibility::Public,
|
||||
@ -378,7 +378,7 @@ fn test_attr_with_path() {
|
||||
},
|
||||
],
|
||||
},
|
||||
tokens: TokenStream(`fn main ( ) { assert_eq ! ( foo ( ) , "Hello, world!" ) ; }`),
|
||||
tokens: TokenStream(`fn main () { assert_eq ! (foo () , "Hello, world!") ; }`),
|
||||
},
|
||||
],
|
||||
vis: Inherited,
|
||||
|
@ -265,7 +265,7 @@ fn test_fn_precedence_in_where_clause() {
|
||||
assert_eq!(predicate.bounds.len(), 2, "{:#?}", predicate.bounds);
|
||||
|
||||
let first_bound = &predicate.bounds[0];
|
||||
assert_eq!(quote!(#first_bound).to_string(), "FnOnce ( ) -> i32");
|
||||
assert_eq!(quote!(#first_bound).to_string(), "FnOnce () -> i32");
|
||||
|
||||
let second_bound = &predicate.bounds[1];
|
||||
assert_eq!(quote!(#second_bound).to_string(), "Send");
|
||||
|
@ -23,7 +23,7 @@ fn test_grouping() {
|
||||
TokenTree::Literal(Literal::i32_suffixed(4)),
|
||||
]);
|
||||
|
||||
assert_eq!(tokens.to_string(), "1i32 + 2i32 + 3i32 * 4i32");
|
||||
assert_eq!(tokens.to_string(), "1i32 + 2i32 + 3i32 * 4i32");
|
||||
|
||||
snapshot!(tokens as Expr, @r###"
|
||||
Expr::Binary {
|
||||
|
@ -40,7 +40,7 @@ fn test_comment() {
|
||||
},
|
||||
],
|
||||
},
|
||||
tokens: TokenStream(`( dead_code )`),
|
||||
tokens: TokenStream(`(dead_code)`),
|
||||
},
|
||||
],
|
||||
items: [
|
||||
|
@ -17,7 +17,7 @@ fn test_struct() {
|
||||
|
||||
snapshot!(input as TokenStream, @r###"
|
||||
TokenStream(
|
||||
`# [ derive ( Debug , Clone ) ] pub struct Item { pub ident : Ident , pub attrs : Vec < Attribute >, }`,
|
||||
`# [derive (Debug , Clone)] pub struct Item { pub ident : Ident , pub attrs : Vec < Attribute >, }`,
|
||||
)
|
||||
"###);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user