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