Skip to content

Commit ef7a6df

Browse files
committed
bless tests
1 parent ba2457c commit ef7a6df

32 files changed

Lines changed: 60 additions & 255 deletions
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
async fn f(mut x: u8) {}
2-
async fn g((mut x, y, mut z): (u8, u8, u8)) {}
3-
async fn g(mut x: u8, (a, mut b, c): (u8, u8, u8), y: u8) {}
1+
async fn f(mut x : u8) {}
2+
async fn g((mut x, y, mut z) : (u8, u8, u8)) {}
3+
async fn g(mut x : u8, (a, mut b, c) : (u8, u8, u8), y : u8) {}

tests/ui/proc-macro/allowed-attr-stmt-expr.stdout

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
8787
span: $DIR/allowed-attr-stmt-expr.rs:57:33: 57:34 (#0),
8888
},
8989
]
90-
PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro!("{}", string);
91-
PRINT-ATTR RE-COLLECTED (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string);
90+
PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string);
9291
PRINT-ATTR INPUT (DEBUG): TokenStream [
9392
Punct {
9493
ch: '#',
@@ -141,8 +140,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
141140
span: $DIR/allowed-attr-stmt-expr.rs:61:28: 61:29 (#0),
142141
},
143142
]
144-
PRINT-ATTR INPUT (DISPLAY): second_make_stmt!(#[allow(dead_code)] struct Bar {});
145-
PRINT-ATTR RE-COLLECTED (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {});
143+
PRINT-ATTR INPUT (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {});
146144
PRINT-ATTR INPUT (DEBUG): TokenStream [
147145
Ident {
148146
ident: "second_make_stmt",

tests/ui/proc-macro/attr-complex-fn.stdout

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
PRINT-ATTR INPUT (DISPLAY): fn foo<T: MyTrait<MyStruct<{ true }>>>() {}
2-
PRINT-ATTR RE-COLLECTED (DISPLAY): fn foo < T : MyTrait < MyStruct < { true } >>> () {}
1+
PRINT-ATTR INPUT (DISPLAY): fn foo < T : MyTrait < MyStruct < { true } >>> () {}
32
PRINT-ATTR INPUT (DEBUG): TokenStream [
43
Ident {
54
ident: "fn",
@@ -77,9 +76,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
7776
span: $DIR/attr-complex-fn.rs:19:42: 19:44 (#0),
7877
},
7978
]
80-
PRINT-ATTR INPUT (DISPLAY): impl<T> MyTrait<T> for MyStruct<{true}> { #![rustc_dummy] }
81-
PRINT-ATTR RE-COLLECTED (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #![rustc_dummy] }
82-
PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #! [rustc_dummy] }
79+
PRINT-ATTR INPUT (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #! [rustc_dummy] }
8380
PRINT-ATTR INPUT (DEBUG): TokenStream [
8481
Ident {
8582
ident: "impl",

tests/ui/proc-macro/attr-stmt-expr.stdout

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
7171
span: $DIR/attr-stmt-expr.rs:49:33: 49:34 (#0),
7272
},
7373
]
74-
PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro!("{}", string);
75-
PRINT-ATTR RE-COLLECTED (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string);
74+
PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string);
7675
PRINT-ATTR INPUT (DEBUG): TokenStream [
7776
Punct {
7877
ch: '#',
@@ -125,8 +124,7 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
125124
span: $DIR/attr-stmt-expr.rs:53:28: 53:29 (#0),
126125
},
127126
]
128-
PRINT-ATTR INPUT (DISPLAY): second_make_stmt!(#[allow(dead_code)] struct Bar {});
129-
PRINT-ATTR RE-COLLECTED (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {});
127+
PRINT-ATTR INPUT (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {});
130128
PRINT-ATTR INPUT (DEBUG): TokenStream [
131129
Ident {
132130
ident: "second_make_stmt",

tests/ui/proc-macro/attribute-after-derive.stdout

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
PRINT-ATTR INPUT (DISPLAY): #[derive(Print)] struct AttributeDerive { #[cfg(false)] field: u8, }
2-
PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[derive(Print)] struct AttributeDerive { #[cfg(false)] field : u8, }
1+
PRINT-ATTR INPUT (DISPLAY): #[derive(Print)] struct AttributeDerive { #[cfg(false)] field : u8, }
32
PRINT-ATTR INPUT (DEBUG): TokenStream [
43
Punct {
54
ch: '#',
@@ -131,8 +130,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
131130
span: $DIR/attribute-after-derive.rs:23:24: 26:2 (#0),
132131
},
133132
]
134-
PRINT-ATTR INPUT (DISPLAY): struct DeriveAttribute { #[cfg(false)] field: u8, }
135-
PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): struct DeriveAttribute { #[cfg(false)] field : u8, }
133+
PRINT-ATTR INPUT (DISPLAY): struct DeriveAttribute { #[cfg(false)] field : u8, }
136134
PRINT-ATTR INPUT (DEBUG): TokenStream [
137135
Ident {
138136
ident: "struct",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fn main() { let y : u32 = "z"; { let x: u32 = "y"; } }
1+
fn main() { let y : u32 = "z"; { let x : u32 = "y"; } }

tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn expect_let(attr: TokenStream, item: TokenStream) -> TokenStream {
1212
#[proc_macro_attribute]
1313
pub fn expect_print_stmt(attr: TokenStream, item: TokenStream) -> TokenStream {
1414
assert!(attr.to_string().is_empty());
15-
assert_eq!(item.to_string(), "println!(\"{}\", string);");
15+
assert_eq!(item.to_string(), "println! (\"{}\", string);");
1616
item
1717
}
1818

@@ -26,7 +26,7 @@ pub fn expect_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
2626
#[proc_macro_attribute]
2727
pub fn expect_print_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
2828
assert!(attr.to_string().is_empty());
29-
assert_eq!(item.to_string(), "println!(\"{}\", string)");
29+
assert_eq!(item.to_string(), "println! (\"{}\", string)");
3030
item
3131
}
3232

tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn expect_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
2626
#[proc_macro_attribute]
2727
pub fn expect_my_macro_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
2828
assert!(attr.to_string().is_empty());
29-
assert_eq!(item.to_string(), "my_macro!(\"{}\", string)");
29+
assert_eq!(item.to_string(), "my_macro! (\"{}\", string)");
3030
item
3131
}
3232

tests/ui/proc-macro/auxiliary/derive-b-rpass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use proc_macro::TokenStream;
55
#[proc_macro_derive(B, attributes(B, C))]
66
pub fn derive(input: TokenStream) -> TokenStream {
77
let input = input.to_string();
8-
assert!(input.contains("#[B[arbitrary tokens]]"));
8+
assert!(input.contains("#[B [arbitrary tokens]]"));
99
assert!(input.contains("struct B {"));
1010
assert!(input.contains("#[C]"));
1111
"".parse().unwrap()

tests/ui/proc-macro/auxiliary/derive-union.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub fn derive(input: TokenStream) -> TokenStream {
77
let input = input.to_string();
88
assert!(input.contains("#[repr(C)]"));
99
assert!(input.contains("union Test {"));
10-
assert!(input.contains("a: u8,"));
10+
assert!(input.contains("a : u8,"));
1111
assert!(input.contains("}"));
1212
"".parse().unwrap()
1313
}

0 commit comments

Comments
 (0)