2021-12-01 19:45:14 +00:00
|
|
|
PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct Foo {}
|
2020-11-17 19:27:44 +00:00
|
|
|
PRINT-ATTR INPUT (DEBUG): TokenStream [
|
|
|
|
Punct {
|
|
|
|
ch: '#',
|
|
|
|
spacing: Alone,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:33:9: 33:10 (#7),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Bracket,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
2020-11-25 21:58:10 +00:00
|
|
|
ident: "rustc_dummy",
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:33:11: 33:22 (#7),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
],
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:33:10: 33:23 (#7),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "struct",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:45:16: 45:22 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "Foo",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:45:23: 45:26 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Brace,
|
|
|
|
stream: TokenStream [],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:45:27: 45:29 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
]
|
2023-08-08 01:43:44 +00:00
|
|
|
PRINT-ATTR INPUT (DISPLAY): #[expect_let] let string = "Hello, world!";
|
|
|
|
PRINT-ATTR RE-COLLECTED (DISPLAY): #[expect_let] let string = "Hello, world!" ;
|
2020-11-24 19:47:49 +00:00
|
|
|
PRINT-ATTR INPUT (DEBUG): TokenStream [
|
|
|
|
Punct {
|
|
|
|
ch: '#',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:48:5: 48:6 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Bracket,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
|
|
|
ident: "expect_let",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:48:7: 48:17 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:48:6: 48:18 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "let",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:49:5: 49:8 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "string",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:49:9: 49:15 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '=',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:49:16: 49:17 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Literal {
|
|
|
|
kind: Str,
|
|
|
|
symbol: "Hello, world!",
|
|
|
|
suffix: None,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:49:18: 49:33 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: ';',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:49:33: 49:34 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
]
|
2023-10-12 04:36:14 +00:00
|
|
|
PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro!("{}", string);
|
2023-08-08 01:43:44 +00:00
|
|
|
PRINT-ATTR RE-COLLECTED (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string) ;
|
2020-11-24 19:47:49 +00:00
|
|
|
PRINT-ATTR INPUT (DEBUG): TokenStream [
|
|
|
|
Punct {
|
|
|
|
ch: '#',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:52:5: 52:6 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Bracket,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
2020-11-27 02:44:09 +00:00
|
|
|
ident: "expect_my_macro_stmt",
|
|
|
|
span: $DIR/attr-stmt-expr.rs:52:7: 52:27 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:52:6: 52:28 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Ident {
|
2020-11-27 02:44:09 +00:00
|
|
|
ident: "my_macro",
|
|
|
|
span: $DIR/attr-stmt-expr.rs:53:5: 53:13 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '!',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:53:13: 53:14 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Str,
|
|
|
|
symbol: "{}",
|
|
|
|
suffix: None,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:53:15: 53:19 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: ',',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:53:19: 53:20 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "string",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:53:21: 53:27 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:53:14: 53:28 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: ';',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:53:28: 53:29 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
]
|
2023-10-12 04:36:14 +00:00
|
|
|
PRINT-ATTR INPUT (DISPLAY): second_make_stmt!(#[allow(dead_code)] struct Bar {});
|
2023-08-08 01:43:44 +00:00
|
|
|
PRINT-ATTR RE-COLLECTED (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {}) ;
|
2020-11-24 19:47:49 +00:00
|
|
|
PRINT-ATTR INPUT (DEBUG): TokenStream [
|
|
|
|
Ident {
|
|
|
|
ident: "second_make_stmt",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:5: 56:21 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '!',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:21: 56:22 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [
|
|
|
|
Punct {
|
|
|
|
ch: '#',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:23: 56:24 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Bracket,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
|
|
|
ident: "allow",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:25: 56:30 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
|
|
|
ident: "dead_code",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:31: 56:40 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:30: 56:41 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:24: 56:42 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "struct",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:43: 56:49 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "Bar",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:50: 56:53 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Brace,
|
|
|
|
stream: TokenStream [],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:54: 56:56 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:22: 56:57 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: ';',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:57: 56:58 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
]
|
2021-12-01 19:45:14 +00:00
|
|
|
PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] #[allow(dead_code)] struct Bar {}
|
2020-11-17 19:27:44 +00:00
|
|
|
PRINT-ATTR INPUT (DEBUG): TokenStream [
|
|
|
|
Punct {
|
|
|
|
ch: '#',
|
|
|
|
spacing: Alone,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:33:9: 33:10 (#28),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Bracket,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
2020-11-25 21:58:10 +00:00
|
|
|
ident: "rustc_dummy",
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:33:11: 33:22 (#28),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
],
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:33:10: 33:23 (#28),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '#',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:23: 56:24 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Bracket,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
|
|
|
ident: "allow",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:25: 56:30 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
|
|
|
ident: "dead_code",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:31: 56:40 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:30: 56:41 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:24: 56:42 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "struct",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:43: 56:49 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "Bar",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:50: 56:53 (#0),
|
2020-11-17 19:27:44 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Brace,
|
|
|
|
stream: TokenStream [],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:56:54: 56:56 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
]
|
2021-12-01 19:45:14 +00:00
|
|
|
PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct Other {}
|
2020-11-24 19:47:49 +00:00
|
|
|
PRINT-ATTR INPUT (DEBUG): TokenStream [
|
|
|
|
Punct {
|
|
|
|
ch: '#',
|
|
|
|
spacing: Alone,
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:59:5: 59:6 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Bracket,
|
|
|
|
stream: TokenStream [
|
|
|
|
Ident {
|
|
|
|
ident: "rustc_dummy",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:59:7: 59:18 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:59:6: 59:19 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "struct",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:60:5: 60:11 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "Other",
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:60:12: 60:17 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Brace,
|
|
|
|
stream: TokenStream [],
|
2020-11-27 02:44:09 +00:00
|
|
|
span: $DIR/attr-stmt-expr.rs:60:18: 60:20 (#0),
|
2020-11-24 19:47:49 +00:00
|
|
|
},
|
|
|
|
]
|