diff options
Diffstat (limited to 'tests/ui/proc-macro')
36 files changed, 386 insertions, 348 deletions
diff --git a/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout b/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout index 091862de3..4f8730053 100644 --- a/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout +++ b/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout @@ -19,17 +19,17 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [ Punct { ch: '#', spacing: Alone, - span: $DIR/allowed-attr-stmt-expr.rs:35:9: 35:10 (#11), + span: $DIR/allowed-attr-stmt-expr.rs:35:9: 35:10 (#10), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "rustc_dummy", - span: $DIR/allowed-attr-stmt-expr.rs:35:11: 35:22 (#11), + span: $DIR/allowed-attr-stmt-expr.rs:35:11: 35:22 (#10), }, ], - span: $DIR/allowed-attr-stmt-expr.rs:35:10: 35:23 (#11), + span: $DIR/allowed-attr-stmt-expr.rs:35:10: 35:23 (#10), }, Ident { ident: "struct", @@ -206,17 +206,17 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [ Punct { ch: '#', spacing: Alone, - span: $DIR/allowed-attr-stmt-expr.rs:35:9: 35:10 (#32), + span: $DIR/allowed-attr-stmt-expr.rs:35:9: 35:10 (#31), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "rustc_dummy", - span: $DIR/allowed-attr-stmt-expr.rs:35:11: 35:22 (#32), + span: $DIR/allowed-attr-stmt-expr.rs:35:11: 35:22 (#31), }, ], - span: $DIR/allowed-attr-stmt-expr.rs:35:10: 35:23 (#32), + span: $DIR/allowed-attr-stmt-expr.rs:35:10: 35:23 (#31), }, Punct { ch: '#', diff --git a/tests/ui/proc-macro/attr-stmt-expr.stdout b/tests/ui/proc-macro/attr-stmt-expr.stdout index f9b2305c7..c6d77e0ed 100644 --- a/tests/ui/proc-macro/attr-stmt-expr.stdout +++ b/tests/ui/proc-macro/attr-stmt-expr.stdout @@ -3,17 +3,17 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [ Punct { ch: '#', spacing: Alone, - span: $DIR/attr-stmt-expr.rs:33:9: 33:10 (#8), + span: $DIR/attr-stmt-expr.rs:33:9: 33:10 (#7), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "rustc_dummy", - span: $DIR/attr-stmt-expr.rs:33:11: 33:22 (#8), + span: $DIR/attr-stmt-expr.rs:33:11: 33:22 (#7), }, ], - span: $DIR/attr-stmt-expr.rs:33:10: 33:23 (#8), + span: $DIR/attr-stmt-expr.rs:33:10: 33:23 (#7), }, Ident { ident: "struct", @@ -190,17 +190,17 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [ Punct { ch: '#', spacing: Alone, - span: $DIR/attr-stmt-expr.rs:33:9: 33:10 (#29), + span: $DIR/attr-stmt-expr.rs:33:9: 33:10 (#28), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "rustc_dummy", - span: $DIR/attr-stmt-expr.rs:33:11: 33:22 (#29), + span: $DIR/attr-stmt-expr.rs:33:11: 33:22 (#28), }, ], - span: $DIR/attr-stmt-expr.rs:33:10: 33:23 (#29), + span: $DIR/attr-stmt-expr.rs:33:10: 33:23 (#28), }, Punct { ch: '#', diff --git a/tests/ui/proc-macro/auxiliary/issue-107113.rs b/tests/ui/proc-macro/auxiliary/issue-107113.rs new file mode 100644 index 000000000..b27d3fd2f --- /dev/null +++ b/tests/ui/proc-macro/auxiliary/issue-107113.rs @@ -0,0 +1,13 @@ +// force-host +// no-prefer-dynamic + +#![crate_type = "proc-macro"] + +extern crate proc_macro; + +use proc_macro::TokenStream; + +#[proc_macro_attribute] +pub fn main(_: TokenStream, item: TokenStream) -> TokenStream { + "fn main() -> std::io::Result<()> { () } ".parse().unwrap() +} diff --git a/tests/ui/proc-macro/capture-macro-rules-invoke.stdout b/tests/ui/proc-macro/capture-macro-rules-invoke.stdout index b88fbd3e8..01d71ff98 100644 --- a/tests/ui/proc-macro/capture-macro-rules-invoke.stdout +++ b/tests/ui/proc-macro/capture-macro-rules-invoke.stdout @@ -8,7 +8,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:36:24: 36:28 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:21:21: 21:26 (#4), + span: $DIR/capture-macro-rules-invoke.rs:21:21: 21:26 (#3), }, ] PRINT-BANG INPUT (DISPLAY): 1 + 1, { "a" }, let a = 1;, String, my_name, 'a, my_val = 30, @@ -37,12 +37,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:38:17: 38:18 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:14:29: 14:34 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:29: 14:34 (#7), }, Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:14:34: 14:35 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:34: 14:35 (#7), }, Group { delimiter: None, @@ -60,12 +60,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:39:13: 39:20 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:14:36: 14:42 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:36: 14:42 (#7), }, Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:14:42: 14:43 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:42: 14:43 (#7), }, Group { delimiter: None, @@ -90,12 +90,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:40:21: 40:22 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:14:44: 14:49 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:44: 14:49 (#7), }, Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:14:49: 14:50 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:49: 14:50 (#7), }, Group { delimiter: None, @@ -105,12 +105,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:41:13: 41:19 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:14:51: 14:54 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:51: 14:54 (#7), }, Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:14:54: 14:55 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:54: 14:55 (#7), }, Ident { ident: "my_name", @@ -119,7 +119,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:14:62: 14:63 (#8), + span: $DIR/capture-macro-rules-invoke.rs:14:62: 14:63 (#7), }, Group { delimiter: None, @@ -134,12 +134,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:43:13: 43:15 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:15:29: 15:38 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:29: 15:38 (#7), }, Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:15:38: 15:39 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:38: 15:39 (#7), }, Group { delimiter: None, @@ -160,12 +160,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:44:22: 44:24 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:15:40: 15:45 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:40: 15:45 (#7), }, Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:15:45: 15:46 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:45: 15:46 (#7), }, Group { delimiter: None, @@ -203,12 +203,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:45:26: 45:32 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:15:47: 15:52 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:47: 15:52 (#7), }, Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:15:52: 15:53 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:52: 15:53 (#7), }, Group { delimiter: None, @@ -246,12 +246,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:46:16: 46:31 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:15:54: 15:58 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:54: 15:58 (#7), }, Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:15:58: 15:59 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:58: 15:59 (#7), }, Group { delimiter: Bracket, @@ -274,7 +274,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ Punct { ch: ',', spacing: Alone, - span: $DIR/capture-macro-rules-invoke.rs:15:63: 15:64 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:63: 15:64 (#7), }, Group { delimiter: None, @@ -291,7 +291,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:48:14: 48:16 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:15:65: 15:69 (#8), + span: $DIR/capture-macro-rules-invoke.rs:15:65: 15:69 (#7), }, ] PRINT-BANG INPUT (DISPLAY): (a, b) @@ -319,6 +319,6 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-macro-rules-invoke.rs:52:26: 52:32 (#0), }, ], - span: $DIR/capture-macro-rules-invoke.rs:27:21: 27:25 (#12), + span: $DIR/capture-macro-rules-invoke.rs:27:21: 27:25 (#11), }, ] diff --git a/tests/ui/proc-macro/capture-unglued-token.stdout b/tests/ui/proc-macro/capture-unglued-token.stdout index 7e6b54033..a0d2178f0 100644 --- a/tests/ui/proc-macro/capture-unglued-token.stdout +++ b/tests/ui/proc-macro/capture-unglued-token.stdout @@ -23,6 +23,6 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/capture-unglued-token.rs:19:30: 19:31 (#0), }, ], - span: $DIR/capture-unglued-token.rs:15:42: 15:48 (#4), + span: $DIR/capture-unglued-token.rs:15:42: 15:48 (#3), }, ] diff --git a/tests/ui/proc-macro/derive-helper-shadowed.rs b/tests/ui/proc-macro/derive-helper-shadowed.rs index e299454e0..ac14ece69 100644 --- a/tests/ui/proc-macro/derive-helper-shadowed.rs +++ b/tests/ui/proc-macro/derive-helper-shadowed.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:test-macros.rs // aux-build:derive-helper-shadowed-2.rs diff --git a/tests/ui/proc-macro/derive-in-mod.rs b/tests/ui/proc-macro/derive-in-mod.rs index 8b5d4e9d0..96e9d93fe 100644 --- a/tests/ui/proc-macro/derive-in-mod.rs +++ b/tests/ui/proc-macro/derive-in-mod.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:test-macros.rs extern crate test_macros; diff --git a/tests/ui/proc-macro/dollar-crate-issue-57089.stdout b/tests/ui/proc-macro/dollar-crate-issue-57089.stdout index 2622c005d..de4f0c000 100644 --- a/tests/ui/proc-macro/dollar-crate-issue-57089.stdout +++ b/tests/ui/proc-macro/dollar-crate-issue-57089.stdout @@ -2,79 +2,79 @@ PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ; PRINT-BANG INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/dollar-crate-issue-57089.rs:17:13: 17:19 (#4), + span: $DIR/dollar-crate-issue-57089.rs:17:13: 17:19 (#3), }, Ident { ident: "M", - span: $DIR/dollar-crate-issue-57089.rs:17:20: 17:21 (#4), + span: $DIR/dollar-crate-issue-57089.rs:17:20: 17:21 (#3), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/dollar-crate-issue-57089.rs:17:22: 17:28 (#4), + span: $DIR/dollar-crate-issue-57089.rs:17:22: 17:28 (#3), }, Punct { ch: ':', spacing: Joint, - span: $DIR/dollar-crate-issue-57089.rs:17:28: 17:29 (#4), + span: $DIR/dollar-crate-issue-57089.rs:17:28: 17:29 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/dollar-crate-issue-57089.rs:17:29: 17:30 (#4), + span: $DIR/dollar-crate-issue-57089.rs:17:29: 17:30 (#3), }, Ident { ident: "S", - span: $DIR/dollar-crate-issue-57089.rs:17:30: 17:31 (#4), + span: $DIR/dollar-crate-issue-57089.rs:17:30: 17:31 (#3), }, ], - span: $DIR/dollar-crate-issue-57089.rs:17:21: 17:32 (#4), + span: $DIR/dollar-crate-issue-57089.rs:17:21: 17:32 (#3), }, Punct { ch: ';', spacing: Alone, - span: $DIR/dollar-crate-issue-57089.rs:17:32: 17:33 (#4), + span: $DIR/dollar-crate-issue-57089.rs:17:32: 17:33 (#3), }, ] PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ; PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/dollar-crate-issue-57089.rs:21:9: 21:15 (#4), + span: $DIR/dollar-crate-issue-57089.rs:21:9: 21:15 (#3), }, Ident { ident: "A", - span: $DIR/dollar-crate-issue-57089.rs:21:16: 21:17 (#4), + span: $DIR/dollar-crate-issue-57089.rs:21:16: 21:17 (#3), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/dollar-crate-issue-57089.rs:21:18: 21:24 (#4), + span: $DIR/dollar-crate-issue-57089.rs:21:18: 21:24 (#3), }, Punct { ch: ':', spacing: Joint, - span: $DIR/dollar-crate-issue-57089.rs:21:24: 21:25 (#4), + span: $DIR/dollar-crate-issue-57089.rs:21:24: 21:25 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/dollar-crate-issue-57089.rs:21:25: 21:26 (#4), + span: $DIR/dollar-crate-issue-57089.rs:21:25: 21:26 (#3), }, Ident { ident: "S", - span: $DIR/dollar-crate-issue-57089.rs:21:26: 21:27 (#4), + span: $DIR/dollar-crate-issue-57089.rs:21:26: 21:27 (#3), }, ], - span: $DIR/dollar-crate-issue-57089.rs:21:17: 21:28 (#4), + span: $DIR/dollar-crate-issue-57089.rs:21:17: 21:28 (#3), }, Punct { ch: ';', spacing: Alone, - span: $DIR/dollar-crate-issue-57089.rs:21:28: 21:29 (#4), + span: $DIR/dollar-crate-issue-57089.rs:21:28: 21:29 (#3), }, ] diff --git a/tests/ui/proc-macro/dollar-crate-issue-62325.stdout b/tests/ui/proc-macro/dollar-crate-issue-62325.stdout index a91908239..c7e72bf4f 100644 --- a/tests/ui/proc-macro/dollar-crate-issue-62325.stdout +++ b/tests/ui/proc-macro/dollar-crate-issue-62325.stdout @@ -2,109 +2,109 @@ PRINT-ATTR INPUT (DISPLAY): struct A(identity! ($crate :: S)) ; PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/dollar-crate-issue-62325.rs:19:5: 19:11 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:5: 19:11 (#3), }, Ident { ident: "A", - span: $DIR/dollar-crate-issue-62325.rs:19:12: 19:13 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:12: 19:13 (#3), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "identity", - span: $DIR/dollar-crate-issue-62325.rs:19:14: 19:22 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:14: 19:22 (#3), }, Punct { ch: '!', spacing: Alone, - span: $DIR/dollar-crate-issue-62325.rs:19:22: 19:23 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:22: 19:23 (#3), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/dollar-crate-issue-62325.rs:19:24: 19:30 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:24: 19:30 (#3), }, Punct { ch: ':', spacing: Joint, - span: $DIR/dollar-crate-issue-62325.rs:19:30: 19:31 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:30: 19:31 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/dollar-crate-issue-62325.rs:19:31: 19:32 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:31: 19:32 (#3), }, Ident { ident: "S", - span: $DIR/dollar-crate-issue-62325.rs:19:32: 19:33 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:32: 19:33 (#3), }, ], - span: $DIR/dollar-crate-issue-62325.rs:19:23: 19:34 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:23: 19:34 (#3), }, ], - span: $DIR/dollar-crate-issue-62325.rs:19:13: 19:35 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:13: 19:35 (#3), }, Punct { ch: ';', spacing: Alone, - span: $DIR/dollar-crate-issue-62325.rs:19:35: 19:36 (#4), + span: $DIR/dollar-crate-issue-62325.rs:19:35: 19:36 (#3), }, ] PRINT-ATTR INPUT (DISPLAY): struct B(identity! ($crate :: S)) ; PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/auxiliary/dollar-crate-external.rs:21:5: 21:11 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:5: 21:11 (#11), }, Ident { ident: "B", - span: $DIR/auxiliary/dollar-crate-external.rs:21:12: 21:13 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:12: 21:13 (#11), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "identity", - span: $DIR/auxiliary/dollar-crate-external.rs:21:14: 21:22 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:14: 21:22 (#11), }, Punct { ch: '!', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:21:22: 21:23 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:22: 21:23 (#11), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/auxiliary/dollar-crate-external.rs:21:24: 21:30 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:24: 21:30 (#11), }, Punct { ch: ':', spacing: Joint, - span: $DIR/auxiliary/dollar-crate-external.rs:21:30: 21:31 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:30: 21:31 (#11), }, Punct { ch: ':', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:21:31: 21:32 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:31: 21:32 (#11), }, Ident { ident: "S", - span: $DIR/auxiliary/dollar-crate-external.rs:21:32: 21:33 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:32: 21:33 (#11), }, ], - span: $DIR/auxiliary/dollar-crate-external.rs:21:23: 21:34 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:23: 21:34 (#11), }, ], - span: $DIR/auxiliary/dollar-crate-external.rs:21:13: 21:35 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:13: 21:35 (#11), }, Punct { ch: ';', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:21:35: 21:36 (#12), + span: $DIR/auxiliary/dollar-crate-external.rs:21:35: 21:36 (#11), }, ] diff --git a/tests/ui/proc-macro/dollar-crate.stdout b/tests/ui/proc-macro/dollar-crate.stdout index 4e169d47e..0f5f87cec 100644 --- a/tests/ui/proc-macro/dollar-crate.stdout +++ b/tests/ui/proc-macro/dollar-crate.stdout @@ -2,239 +2,239 @@ PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ; PRINT-BANG INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/dollar-crate.rs:20:17: 20:23 (#4), + span: $DIR/dollar-crate.rs:20:17: 20:23 (#3), }, Ident { ident: "M", - span: $DIR/dollar-crate.rs:20:24: 20:25 (#4), + span: $DIR/dollar-crate.rs:20:24: 20:25 (#3), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/dollar-crate.rs:20:26: 20:32 (#4), + span: $DIR/dollar-crate.rs:20:26: 20:32 (#3), }, Punct { ch: ':', spacing: Joint, - span: $DIR/dollar-crate.rs:20:32: 20:33 (#4), + span: $DIR/dollar-crate.rs:20:32: 20:33 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/dollar-crate.rs:20:33: 20:34 (#4), + span: $DIR/dollar-crate.rs:20:33: 20:34 (#3), }, Ident { ident: "S", - span: $DIR/dollar-crate.rs:20:34: 20:35 (#4), + span: $DIR/dollar-crate.rs:20:34: 20:35 (#3), }, ], - span: $DIR/dollar-crate.rs:20:25: 20:36 (#4), + span: $DIR/dollar-crate.rs:20:25: 20:36 (#3), }, Punct { ch: ';', spacing: Alone, - span: $DIR/dollar-crate.rs:20:36: 20:37 (#4), + span: $DIR/dollar-crate.rs:20:36: 20:37 (#3), }, ] PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ; PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/dollar-crate.rs:24:13: 24:19 (#4), + span: $DIR/dollar-crate.rs:24:13: 24:19 (#3), }, Ident { ident: "A", - span: $DIR/dollar-crate.rs:24:20: 24:21 (#4), + span: $DIR/dollar-crate.rs:24:20: 24:21 (#3), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/dollar-crate.rs:24:22: 24:28 (#4), + span: $DIR/dollar-crate.rs:24:22: 24:28 (#3), }, Punct { ch: ':', spacing: Joint, - span: $DIR/dollar-crate.rs:24:28: 24:29 (#4), + span: $DIR/dollar-crate.rs:24:28: 24:29 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/dollar-crate.rs:24:29: 24:30 (#4), + span: $DIR/dollar-crate.rs:24:29: 24:30 (#3), }, Ident { ident: "S", - span: $DIR/dollar-crate.rs:24:30: 24:31 (#4), + span: $DIR/dollar-crate.rs:24:30: 24:31 (#3), }, ], - span: $DIR/dollar-crate.rs:24:21: 24:32 (#4), + span: $DIR/dollar-crate.rs:24:21: 24:32 (#3), }, Punct { ch: ';', spacing: Alone, - span: $DIR/dollar-crate.rs:24:32: 24:33 (#4), + span: $DIR/dollar-crate.rs:24:32: 24:33 (#3), }, ] PRINT-DERIVE INPUT (DISPLAY): struct D($crate :: S) ; PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/dollar-crate.rs:27:13: 27:19 (#4), + span: $DIR/dollar-crate.rs:27:13: 27:19 (#3), }, Ident { ident: "D", - span: $DIR/dollar-crate.rs:27:20: 27:21 (#4), + span: $DIR/dollar-crate.rs:27:20: 27:21 (#3), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/dollar-crate.rs:27:22: 27:28 (#4), + span: $DIR/dollar-crate.rs:27:22: 27:28 (#3), }, Punct { ch: ':', spacing: Joint, - span: $DIR/dollar-crate.rs:27:28: 27:29 (#4), + span: $DIR/dollar-crate.rs:27:28: 27:29 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/dollar-crate.rs:27:29: 27:30 (#4), + span: $DIR/dollar-crate.rs:27:29: 27:30 (#3), }, Ident { ident: "S", - span: $DIR/dollar-crate.rs:27:30: 27:31 (#4), + span: $DIR/dollar-crate.rs:27:30: 27:31 (#3), }, ], - span: $DIR/dollar-crate.rs:27:21: 27:32 (#4), + span: $DIR/dollar-crate.rs:27:21: 27:32 (#3), }, Punct { ch: ';', spacing: Alone, - span: $DIR/dollar-crate.rs:27:32: 27:33 (#4), + span: $DIR/dollar-crate.rs:27:32: 27:33 (#3), }, ] PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ; PRINT-BANG INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/auxiliary/dollar-crate-external.rs:7:13: 7:19 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:7:13: 7:19 (#14), }, Ident { ident: "M", - span: $DIR/auxiliary/dollar-crate-external.rs:7:20: 7:21 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:7:20: 7:21 (#14), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/auxiliary/dollar-crate-external.rs:7:22: 7:28 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:7:22: 7:28 (#14), }, Punct { ch: ':', spacing: Joint, - span: $DIR/auxiliary/dollar-crate-external.rs:7:28: 7:29 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:7:28: 7:29 (#14), }, Punct { ch: ':', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:7:29: 7:30 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:7:29: 7:30 (#14), }, Ident { ident: "S", - span: $DIR/auxiliary/dollar-crate-external.rs:7:30: 7:31 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:7:30: 7:31 (#14), }, ], - span: $DIR/auxiliary/dollar-crate-external.rs:7:21: 7:32 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:7:21: 7:32 (#14), }, Punct { ch: ';', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:7:32: 7:33 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:7:32: 7:33 (#14), }, ] PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ; PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/auxiliary/dollar-crate-external.rs:11:9: 11:15 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:11:9: 11:15 (#14), }, Ident { ident: "A", - span: $DIR/auxiliary/dollar-crate-external.rs:11:16: 11:17 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:11:16: 11:17 (#14), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/auxiliary/dollar-crate-external.rs:11:18: 11:24 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:11:18: 11:24 (#14), }, Punct { ch: ':', spacing: Joint, - span: $DIR/auxiliary/dollar-crate-external.rs:11:24: 11:25 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:11:24: 11:25 (#14), }, Punct { ch: ':', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:11:25: 11:26 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:11:25: 11:26 (#14), }, Ident { ident: "S", - span: $DIR/auxiliary/dollar-crate-external.rs:11:26: 11:27 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:11:26: 11:27 (#14), }, ], - span: $DIR/auxiliary/dollar-crate-external.rs:11:17: 11:28 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:11:17: 11:28 (#14), }, Punct { ch: ';', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:11:28: 11:29 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:11:28: 11:29 (#14), }, ] PRINT-DERIVE INPUT (DISPLAY): struct D($crate :: S) ; PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/auxiliary/dollar-crate-external.rs:14:9: 14:15 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:14:9: 14:15 (#14), }, Ident { ident: "D", - span: $DIR/auxiliary/dollar-crate-external.rs:14:16: 14:17 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:14:16: 14:17 (#14), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: $DIR/auxiliary/dollar-crate-external.rs:14:18: 14:24 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:14:18: 14:24 (#14), }, Punct { ch: ':', spacing: Joint, - span: $DIR/auxiliary/dollar-crate-external.rs:14:24: 14:25 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:14:24: 14:25 (#14), }, Punct { ch: ':', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:14:25: 14:26 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:14:25: 14:26 (#14), }, Ident { ident: "S", - span: $DIR/auxiliary/dollar-crate-external.rs:14:26: 14:27 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:14:26: 14:27 (#14), }, ], - span: $DIR/auxiliary/dollar-crate-external.rs:14:17: 14:28 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:14:17: 14:28 (#14), }, Punct { ch: ';', spacing: Alone, - span: $DIR/auxiliary/dollar-crate-external.rs:14:28: 14:29 (#15), + span: $DIR/auxiliary/dollar-crate-external.rs:14:28: 14:29 (#14), }, ] diff --git a/tests/ui/proc-macro/edition-imports-2018.rs b/tests/ui/proc-macro/edition-imports-2018.rs index 5a77cd4ef..765673531 100644 --- a/tests/ui/proc-macro/edition-imports-2018.rs +++ b/tests/ui/proc-macro/edition-imports-2018.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // edition:2018 // aux-build:edition-imports-2015.rs diff --git a/tests/ui/proc-macro/expand-to-derive.stdout b/tests/ui/proc-macro/expand-to-derive.stdout index a6437982a..39f009183 100644 --- a/tests/ui/proc-macro/expand-to-derive.stdout +++ b/tests/ui/proc-macro/expand-to-derive.stdout @@ -6,35 +6,35 @@ PRINT-DERIVE INPUT (DISPLAY): struct Foo PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/expand-to-derive.rs:16:9: 16:15 (#4), + span: $DIR/expand-to-derive.rs:16:9: 16:15 (#3), }, Ident { ident: "Foo", - span: $DIR/expand-to-derive.rs:16:16: 16:19 (#4), + span: $DIR/expand-to-derive.rs:16:16: 16:19 (#3), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "field", - span: $DIR/expand-to-derive.rs:18:13: 18:18 (#4), + span: $DIR/expand-to-derive.rs:18:13: 18:18 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/expand-to-derive.rs:18:18: 18:19 (#4), + span: $DIR/expand-to-derive.rs:18:18: 18:19 (#3), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "bool", - span: $DIR/expand-to-derive.rs:18:21: 18:25 (#4), + span: $DIR/expand-to-derive.rs:18:21: 18:25 (#3), }, Punct { ch: ';', spacing: Alone, - span: $DIR/expand-to-derive.rs:18:25: 18:26 (#4), + span: $DIR/expand-to-derive.rs:18:25: 18:26 (#3), }, Group { delimiter: Brace, @@ -90,15 +90,15 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ kind: Integer, symbol: "0", suffix: None, - span: $DIR/expand-to-derive.rs:20:17: 20:18 (#4), + span: $DIR/expand-to-derive.rs:20:17: 20:18 (#3), }, ], - span: $DIR/expand-to-derive.rs:18:27: 21:14 (#4), + span: $DIR/expand-to-derive.rs:18:27: 21:14 (#3), }, ], - span: $DIR/expand-to-derive.rs:18:20: 21:15 (#4), + span: $DIR/expand-to-derive.rs:18:20: 21:15 (#3), }, ], - span: $DIR/expand-to-derive.rs:16:20: 22:10 (#4), + span: $DIR/expand-to-derive.rs:16:20: 22:10 (#3), }, ] diff --git a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout index 686d53e88..40181efc0 100644 --- a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout +++ b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout @@ -3,39 +3,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = #[allow(warning PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #4 bytes(299..303), + span: #3 bytes(299..303), }, Ident { ident: "E", - span: #4 bytes(304..305), + span: #3 bytes(304..305), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #4 bytes(320..321), + span: #3 bytes(320..321), }, Punct { ch: '=', spacing: Alone, - span: #4 bytes(322..323), + span: #3 bytes(322..323), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #4 bytes(326..329), + span: #3 bytes(326..329), }, Ident { ident: "_", - span: #4 bytes(330..331), + span: #3 bytes(330..331), }, Punct { ch: '=', spacing: Alone, - span: #4 bytes(332..333), + span: #3 bytes(332..333), }, Group { delimiter: None, @@ -97,29 +97,29 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ span: #0 bytes(560..561), }, ], - span: #4 bytes(334..339), + span: #3 bytes(334..339), }, Punct { ch: ';', spacing: Alone, - span: #4 bytes(339..340), + span: #3 bytes(339..340), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #4 bytes(341..342), + span: #3 bytes(341..342), }, ], - span: #4 bytes(324..344), + span: #3 bytes(324..344), }, Punct { ch: ',', spacing: Alone, - span: #4 bytes(344..345), + span: #3 bytes(344..345), }, ], - span: #4 bytes(306..355), + span: #3 bytes(306..355), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0; } ; 0 }, } @@ -127,39 +127,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 } ; 0 }, } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #8 bytes(423..427), + span: #7 bytes(423..427), }, Ident { ident: "E", - span: #8 bytes(428..429), + span: #7 bytes(428..429), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #8 bytes(444..445), + span: #7 bytes(444..445), }, Punct { ch: '=', spacing: Alone, - span: #8 bytes(446..447), + span: #7 bytes(446..447), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #8 bytes(450..453), + span: #7 bytes(450..453), }, Ident { ident: "_", - span: #8 bytes(454..455), + span: #7 bytes(454..455), }, Punct { ch: '=', spacing: Alone, - span: #8 bytes(456..457), + span: #7 bytes(456..457), }, Group { delimiter: Brace, @@ -174,71 +174,71 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ span: #0 bytes(578..579), }, ], - span: #8 bytes(460..465), + span: #7 bytes(460..465), }, ], - span: #8 bytes(458..467), + span: #7 bytes(458..467), }, Punct { ch: ';', spacing: Alone, - span: #8 bytes(467..468), + span: #7 bytes(467..468), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #8 bytes(469..470), + span: #7 bytes(469..470), }, ], - span: #8 bytes(448..472), + span: #7 bytes(448..472), }, Punct { ch: ',', spacing: Alone, - span: #8 bytes(472..473), + span: #7 bytes(472..473), }, ], - span: #8 bytes(430..483), + span: #7 bytes(430..483), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { {} } ; 0 }, } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #12 bytes(423..427), + span: #11 bytes(423..427), }, Ident { ident: "E", - span: #12 bytes(428..429), + span: #11 bytes(428..429), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #12 bytes(444..445), + span: #11 bytes(444..445), }, Punct { ch: '=', spacing: Alone, - span: #12 bytes(446..447), + span: #11 bytes(446..447), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #12 bytes(450..453), + span: #11 bytes(450..453), }, Ident { ident: "_", - span: #12 bytes(454..455), + span: #11 bytes(454..455), }, Punct { ch: '=', spacing: Alone, - span: #12 bytes(456..457), + span: #11 bytes(456..457), }, Group { delimiter: Brace, @@ -252,32 +252,32 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ span: #0 bytes(596..598), }, ], - span: #12 bytes(460..465), + span: #11 bytes(460..465), }, ], - span: #12 bytes(458..467), + span: #11 bytes(458..467), }, Punct { ch: ';', spacing: Alone, - span: #12 bytes(467..468), + span: #11 bytes(467..468), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #12 bytes(469..470), + span: #11 bytes(469..470), }, ], - span: #12 bytes(448..472), + span: #11 bytes(448..472), }, Punct { ch: ',', spacing: Alone, - span: #12 bytes(472..473), + span: #11 bytes(472..473), }, ], - span: #12 bytes(430..483), + span: #11 bytes(430..483), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH; } ; 0 }, } @@ -285,39 +285,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH } ; 0 }, PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #16 bytes(423..427), + span: #15 bytes(423..427), }, Ident { ident: "E", - span: #16 bytes(428..429), + span: #15 bytes(428..429), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #16 bytes(444..445), + span: #15 bytes(444..445), }, Punct { ch: '=', spacing: Alone, - span: #16 bytes(446..447), + span: #15 bytes(446..447), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #16 bytes(450..453), + span: #15 bytes(450..453), }, Ident { ident: "_", - span: #16 bytes(454..455), + span: #15 bytes(454..455), }, Punct { ch: '=', spacing: Alone, - span: #16 bytes(456..457), + span: #15 bytes(456..457), }, Group { delimiter: Brace, @@ -330,32 +330,32 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ span: #0 bytes(615..619), }, ], - span: #16 bytes(460..465), + span: #15 bytes(460..465), }, ], - span: #16 bytes(458..467), + span: #15 bytes(458..467), }, Punct { ch: ';', spacing: Alone, - span: #16 bytes(467..468), + span: #15 bytes(467..468), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #16 bytes(469..470), + span: #15 bytes(469..470), }, ], - span: #16 bytes(448..472), + span: #15 bytes(448..472), }, Punct { ch: ',', spacing: Alone, - span: #16 bytes(472..473), + span: #15 bytes(472..473), }, ], - span: #16 bytes(430..483), + span: #15 bytes(430..483), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0 + 1; } ; 0 }, } @@ -363,39 +363,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 + 1 } ; 0 } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #20 bytes(423..427), + span: #19 bytes(423..427), }, Ident { ident: "E", - span: #20 bytes(428..429), + span: #19 bytes(428..429), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #20 bytes(444..445), + span: #19 bytes(444..445), }, Punct { ch: '=', spacing: Alone, - span: #20 bytes(446..447), + span: #19 bytes(446..447), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #20 bytes(450..453), + span: #19 bytes(450..453), }, Ident { ident: "_", - span: #20 bytes(454..455), + span: #19 bytes(454..455), }, Punct { ch: '=', spacing: Alone, - span: #20 bytes(456..457), + span: #19 bytes(456..457), }, Group { delimiter: Brace, @@ -421,32 +421,32 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ span: #0 bytes(640..641), }, ], - span: #20 bytes(460..465), + span: #19 bytes(460..465), }, ], - span: #20 bytes(458..467), + span: #19 bytes(458..467), }, Punct { ch: ';', spacing: Alone, - span: #20 bytes(467..468), + span: #19 bytes(467..468), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #20 bytes(469..470), + span: #19 bytes(469..470), }, ], - span: #20 bytes(448..472), + span: #19 bytes(448..472), }, Punct { ch: ',', spacing: Alone, - span: #20 bytes(472..473), + span: #19 bytes(472..473), }, ], - span: #20 bytes(430..483), + span: #19 bytes(430..483), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH + 1; } ; 0 }, } @@ -454,39 +454,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH + 1 } ; PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #24 bytes(423..427), + span: #23 bytes(423..427), }, Ident { ident: "E", - span: #24 bytes(428..429), + span: #23 bytes(428..429), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #24 bytes(444..445), + span: #23 bytes(444..445), }, Punct { ch: '=', spacing: Alone, - span: #24 bytes(446..447), + span: #23 bytes(446..447), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #24 bytes(450..453), + span: #23 bytes(450..453), }, Ident { ident: "_", - span: #24 bytes(454..455), + span: #23 bytes(454..455), }, Punct { ch: '=', spacing: Alone, - span: #24 bytes(456..457), + span: #23 bytes(456..457), }, Group { delimiter: Brace, @@ -510,31 +510,31 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ span: #0 bytes(665..666), }, ], - span: #24 bytes(460..465), + span: #23 bytes(460..465), }, ], - span: #24 bytes(458..467), + span: #23 bytes(458..467), }, Punct { ch: ';', spacing: Alone, - span: #24 bytes(467..468), + span: #23 bytes(467..468), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #24 bytes(469..470), + span: #23 bytes(469..470), }, ], - span: #24 bytes(448..472), + span: #23 bytes(448..472), }, Punct { ch: ',', spacing: Alone, - span: #24 bytes(472..473), + span: #23 bytes(472..473), }, ], - span: #24 bytes(430..483), + span: #23 bytes(430..483), }, ] diff --git a/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs b/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs index a6e64e1b1..38f61c36c 100644 --- a/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs +++ b/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // edition:2018 extern crate proc_macro; diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import.rs b/tests/ui/proc-macro/helper-attr-blocked-by-import.rs index 2e20a3de6..344323122 100644 --- a/tests/ui/proc-macro/helper-attr-blocked-by-import.rs +++ b/tests/ui/proc-macro/helper-attr-blocked-by-import.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:test-macros.rs #[macro_use(Empty)] diff --git a/tests/ui/proc-macro/input-interpolated.stdout b/tests/ui/proc-macro/input-interpolated.stdout index 34566c780..6a8789b2c 100644 --- a/tests/ui/proc-macro/input-interpolated.stdout +++ b/tests/ui/proc-macro/input-interpolated.stdout @@ -9,7 +9,7 @@ PRINT-ATTR INPUT (DISPLAY): const A : u8 = 0 ; PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "const", - span: #4 bytes(416..421), + span: #3 bytes(416..421), }, Ident { ident: "A", @@ -18,34 +18,34 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [ Punct { ch: ':', spacing: Alone, - span: #4 bytes(424..425), + span: #3 bytes(424..425), }, Ident { ident: "u8", - span: #4 bytes(426..428), + span: #3 bytes(426..428), }, Punct { ch: '=', spacing: Alone, - span: #4 bytes(429..430), + span: #3 bytes(429..430), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #4 bytes(431..432), + span: #3 bytes(431..432), }, Punct { ch: ';', spacing: Alone, - span: #4 bytes(432..433), + span: #3 bytes(432..433), }, ] PRINT-DERIVE INPUT (DISPLAY): struct A {} PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: #4 bytes(468..474), + span: #3 bytes(468..474), }, Ident { ident: "A", @@ -54,6 +54,6 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ Group { delimiter: Brace, stream: TokenStream [], - span: #4 bytes(478..480), + span: #3 bytes(478..480), }, ] diff --git a/tests/ui/proc-macro/issue-107113-wrap.rs b/tests/ui/proc-macro/issue-107113-wrap.rs new file mode 100644 index 000000000..bc5b44963 --- /dev/null +++ b/tests/ui/proc-macro/issue-107113-wrap.rs @@ -0,0 +1,8 @@ +// edition:2021 +// aux-build:issue-107113.rs + +#[macro_use] +extern crate issue_107113; + +#[issue_107113::main] //~ ERROR mismatched types [E0308] +async fn main() -> std::io::Result<()> {} diff --git a/tests/ui/proc-macro/issue-107113-wrap.stderr b/tests/ui/proc-macro/issue-107113-wrap.stderr new file mode 100644 index 000000000..4122253d2 --- /dev/null +++ b/tests/ui/proc-macro/issue-107113-wrap.stderr @@ -0,0 +1,16 @@ +error[E0308]: mismatched types + --> $DIR/issue-107113-wrap.rs:7:1 + | +LL | #[issue_107113::main] + | ^^^^^^^^^^^^^^^^^^^^^ + | | + | expected `Result<(), Error>`, found `()` + | expected `Result<(), std::io::Error>` because of return type + | + = note: expected enum `Result<(), std::io::Error>` + found unit type `()` + = note: this error originates in the attribute macro `issue_107113::main` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/proc-macro/issue-53481.rs b/tests/ui/proc-macro/issue-53481.rs index ae10a3baa..922e60a4c 100644 --- a/tests/ui/proc-macro/issue-53481.rs +++ b/tests/ui/proc-macro/issue-53481.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:test-macros.rs #[macro_use] diff --git a/tests/ui/proc-macro/issue-75734-pp-paren.stdout b/tests/ui/proc-macro/issue-75734-pp-paren.stdout index 0fda6654f..2f7c013e9 100644 --- a/tests/ui/proc-macro/issue-75734-pp-paren.stdout +++ b/tests/ui/proc-macro/issue-75734-pp-paren.stdout @@ -118,17 +118,17 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/issue-75734-pp-paren.rs:25:16: 25:17 (#0), }, ], - span: $DIR/issue-75734-pp-paren.rs:17:21: 17:25 (#7), + span: $DIR/issue-75734-pp-paren.rs:17:21: 17:25 (#6), }, Punct { ch: '*', spacing: Alone, - span: $DIR/issue-75734-pp-paren.rs:17:26: 17:27 (#7), + span: $DIR/issue-75734-pp-paren.rs:17:26: 17:27 (#6), }, Literal { kind: Integer, symbol: "2", suffix: None, - span: $DIR/issue-75734-pp-paren.rs:17:28: 17:29 (#7), + span: $DIR/issue-75734-pp-paren.rs:17:28: 17:29 (#6), }, ] diff --git a/tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout b/tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout index 60a400a5d..ae5e94008 100644 --- a/tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout +++ b/tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout @@ -5,12 +5,12 @@ PRINT-BANG DEEP-RE-COLLECTED (DISPLAY): foo! { #[fake_attr] mod bar { #! [doc = PRINT-BANG INPUT (DEBUG): TokenStream [ Ident { ident: "foo", - span: $DIR/issue-78675-captured-inner-attrs.rs:20:9: 20:12 (#4), + span: $DIR/issue-78675-captured-inner-attrs.rs:20:9: 20:12 (#3), }, Punct { ch: '!', spacing: Alone, - span: $DIR/issue-78675-captured-inner-attrs.rs:20:12: 20:13 (#4), + span: $DIR/issue-78675-captured-inner-attrs.rs:20:12: 20:13 (#3), }, Group { delimiter: Brace, @@ -18,17 +18,17 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ Punct { ch: '#', spacing: Alone, - span: $DIR/issue-78675-captured-inner-attrs.rs:21:13: 21:14 (#4), + span: $DIR/issue-78675-captured-inner-attrs.rs:21:13: 21:14 (#3), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "fake_attr", - span: $DIR/issue-78675-captured-inner-attrs.rs:21:15: 21:24 (#4), + span: $DIR/issue-78675-captured-inner-attrs.rs:21:15: 21:24 (#3), }, ], - span: $DIR/issue-78675-captured-inner-attrs.rs:21:14: 21:25 (#4), + span: $DIR/issue-78675-captured-inner-attrs.rs:21:14: 21:25 (#3), }, Group { delimiter: None, @@ -79,9 +79,9 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/issue-78675-captured-inner-attrs.rs:27:13: 29:6 (#0), }, ], - span: $DIR/issue-78675-captured-inner-attrs.rs:22:13: 22:18 (#4), + span: $DIR/issue-78675-captured-inner-attrs.rs:22:13: 22:18 (#3), }, ], - span: $DIR/issue-78675-captured-inner-attrs.rs:20:14: 23:10 (#4), + span: $DIR/issue-78675-captured-inner-attrs.rs:20:14: 23:10 (#3), }, ] diff --git a/tests/ui/proc-macro/issue-80760-empty-stmt.stdout b/tests/ui/proc-macro/issue-80760-empty-stmt.stdout index 4b7ed8743..82f52e4bc 100644 --- a/tests/ui/proc-macro/issue-80760-empty-stmt.stdout +++ b/tests/ui/proc-macro/issue-80760-empty-stmt.stdout @@ -9,6 +9,6 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/issue-80760-empty-stmt.rs:25:17: 25:18 (#0), }, ], - span: $DIR/issue-80760-empty-stmt.rs:13:21: 13:23 (#4), + span: $DIR/issue-80760-empty-stmt.rs:13:21: 13:23 (#3), }, ] diff --git a/tests/ui/proc-macro/load-panic-backtrace.stderr b/tests/ui/proc-macro/load-panic-backtrace.stderr index 45d4fd1c9..c1a642713 100644 --- a/tests/ui/proc-macro/load-panic-backtrace.stderr +++ b/tests/ui/proc-macro/load-panic-backtrace.stderr @@ -1,4 +1,5 @@ -at 'panic-derive', $DIR/auxiliary/test-macros.rs:43:5 +at $DIR/auxiliary/test-macros.rs:43:5: +panic-derive error: proc-macro derive panicked --> $DIR/load-panic-backtrace.rs:11:10 | diff --git a/tests/ui/proc-macro/macro-rules-derive-cfg.stdout b/tests/ui/proc-macro/macro-rules-derive-cfg.stdout index 74641058e..aee0f966d 100644 --- a/tests/ui/proc-macro/macro-rules-derive-cfg.stdout +++ b/tests/ui/proc-macro/macro-rules-derive-cfg.stdout @@ -10,76 +10,76 @@ PRINT-DERIVE INPUT (DISPLAY): struct Foo PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/macro-rules-derive-cfg.rs:17:9: 17:15 (#4), + span: $DIR/macro-rules-derive-cfg.rs:17:9: 17:15 (#3), }, Ident { ident: "Foo", - span: $DIR/macro-rules-derive-cfg.rs:17:16: 17:19 (#4), + span: $DIR/macro-rules-derive-cfg.rs:17:16: 17:19 (#3), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "val", - span: $DIR/macro-rules-derive-cfg.rs:18:13: 18:16 (#4), + span: $DIR/macro-rules-derive-cfg.rs:18:13: 18:16 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/macro-rules-derive-cfg.rs:18:16: 18:17 (#4), + span: $DIR/macro-rules-derive-cfg.rs:18:16: 18:17 (#3), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "bool", - span: $DIR/macro-rules-derive-cfg.rs:18:19: 18:23 (#4), + span: $DIR/macro-rules-derive-cfg.rs:18:19: 18:23 (#3), }, Punct { ch: ';', spacing: Alone, - span: $DIR/macro-rules-derive-cfg.rs:18:23: 18:24 (#4), + span: $DIR/macro-rules-derive-cfg.rs:18:23: 18:24 (#3), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: $DIR/macro-rules-derive-cfg.rs:19:17: 19:20 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:17: 19:20 (#3), }, Ident { ident: "a", - span: $DIR/macro-rules-derive-cfg.rs:19:21: 19:22 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:21: 19:22 (#3), }, Punct { ch: '=', spacing: Alone, - span: $DIR/macro-rules-derive-cfg.rs:19:23: 19:24 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:23: 19:24 (#3), }, Punct { ch: '#', spacing: Alone, - span: $DIR/macro-rules-derive-cfg.rs:19:25: 19:26 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:25: 19:26 (#3), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "rustc_dummy", - span: $DIR/macro-rules-derive-cfg.rs:19:48: 19:59 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:48: 19:59 (#3), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "first", - span: $DIR/macro-rules-derive-cfg.rs:19:60: 19:65 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:60: 19:65 (#3), }, ], - span: $DIR/macro-rules-derive-cfg.rs:19:59: 19:66 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:59: 19:66 (#3), }, ], - span: $DIR/macro-rules-derive-cfg.rs:19:25: 19:26 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:25: 19:26 (#3), }, Punct { ch: '#', @@ -151,21 +151,21 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ Punct { ch: ';', spacing: Alone, - span: $DIR/macro-rules-derive-cfg.rs:19:74: 19:75 (#4), + span: $DIR/macro-rules-derive-cfg.rs:19:74: 19:75 (#3), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: $DIR/macro-rules-derive-cfg.rs:20:17: 20:18 (#4), + span: $DIR/macro-rules-derive-cfg.rs:20:17: 20:18 (#3), }, ], - span: $DIR/macro-rules-derive-cfg.rs:18:25: 21:14 (#4), + span: $DIR/macro-rules-derive-cfg.rs:18:25: 21:14 (#3), }, ], - span: $DIR/macro-rules-derive-cfg.rs:18:18: 21:15 (#4), + span: $DIR/macro-rules-derive-cfg.rs:18:18: 21:15 (#3), }, ], - span: $DIR/macro-rules-derive-cfg.rs:17:20: 22:10 (#4), + span: $DIR/macro-rules-derive-cfg.rs:17:20: 22:10 (#3), }, ] diff --git a/tests/ui/proc-macro/macro-use-attr.rs b/tests/ui/proc-macro/macro-use-attr.rs index b101c09ed..d275fb6a8 100644 --- a/tests/ui/proc-macro/macro-use-attr.rs +++ b/tests/ui/proc-macro/macro-use-attr.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:test-macros.rs #[macro_use] diff --git a/tests/ui/proc-macro/macro-use-bang.rs b/tests/ui/proc-macro/macro-use-bang.rs index 4a0bf0b2f..e3174fd44 100644 --- a/tests/ui/proc-macro/macro-use-bang.rs +++ b/tests/ui/proc-macro/macro-use-bang.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:test-macros.rs #[macro_use] diff --git a/tests/ui/proc-macro/meta-macro-hygiene.rs b/tests/ui/proc-macro/meta-macro-hygiene.rs index 70b8d8da1..72fd88e11 100644 --- a/tests/ui/proc-macro/meta-macro-hygiene.rs +++ b/tests/ui/proc-macro/meta-macro-hygiene.rs @@ -3,8 +3,10 @@ // edition:2018 // compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no // check-pass +// ignore-tidy-linelength // normalize-stdout-test "\d+#" -> "0#" // normalize-stdout-test "expn\d{3,}" -> "expnNNN" +// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" // // We don't care about symbol ids, so we set them all to 0 // in the stdout @@ -22,7 +24,7 @@ macro_rules! produce_it { // the fact that `print_def_site` is produced by a // `macro_rules!` macro in `make_macro`). meta_macro::print_def_site!($crate::dummy!()); - } + }; } fn main() { diff --git a/tests/ui/proc-macro/meta-macro-hygiene.stdout b/tests/ui/proc-macro/meta-macro-hygiene.stdout index 6b7b0c819..eeb7179e6 100644 --- a/tests/ui/proc-macro/meta-macro-hygiene.stdout +++ b/tests/ui/proc-macro/meta-macro-hygiene.stdout @@ -1,14 +1,16 @@ -Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) -Input: TokenStream [Ident { ident: "$crate", span: $DIR/meta-macro-hygiene.rs:24:37: 24:43 (#4) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:24:43: 24:44 (#4) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:44: 24:45 (#4) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:24:45: 24:50 (#4) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:50: 24:51 (#4) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:24:51: 24:53 (#4) }] -Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: ':', spacing: Joint, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: ':', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Ident { ident: "dummy", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: '!', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }] +Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) +Input: TokenStream [Ident { ident: "$crate", span: $DIR/meta-macro-hygiene.rs:26:37: 26:43 (#3) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:26:43: 26:44 (#3) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:26:44: 26:45 (#3) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:26:45: 26:50 (#3) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:26:50: 26:51 (#3) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:26:51: 26:53 (#3) }] +Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: ':', spacing: Joint, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: ':', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Ident { ident: "dummy", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: '!', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }] #![feature /* 0#0 */(prelude_import)] // aux-build:make-macro.rs // aux-build:meta-macro.rs // edition:2018 // compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no // check-pass +// ignore-tidy-linelength // normalize-stdout-test "\d+#" -> "0#" // normalize-stdout-test "expn\d{3,}" -> "expnNNN" +// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" // // We don't care about symbol ids, so we set them all to 0 // in the stdout @@ -18,8 +20,7 @@ Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro use core /* 0#1 */::prelude /* 0#1 */::rust_2018 /* 0#1 */::*; #[macro_use /* 0#1 */] extern crate core /* 0#1 */; -#[macro_use /* 0#1 */] -extern crate compiler_builtins /* 0#1 */; +extern crate compiler_builtins /* NNN */ as _ /* 0#1 */; // Don't load unnecessary hygiene information from std extern crate std /* 0#0 */; @@ -37,7 +38,7 @@ macro_rules! produce_it // relative to `meta_macro`, *not* `make_macro` (despite // the fact that `print_def_site` is produced by a // `macro_rules!` macro in `make_macro`). - } + } ; } fn main /* 0#0 */() { ; } @@ -47,23 +48,21 @@ Expansions: crate0::{{expn0}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Root crate0::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports) crate0::{{expn2}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "produce_it") -crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #4, def_site_ctxt: #0, kind: Macro(Bang, "meta_macro::print_def_site") -crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #5, def_site_ctxt: #0, kind: Macro(Bang, "$crate::dummy") +crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #3, def_site_ctxt: #0, kind: Macro(Bang, "meta_macro::print_def_site") +crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #4, def_site_ctxt: #0, kind: Macro(Bang, "$crate::dummy") crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive") crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive") crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "include") -crate2::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports) SyntaxContexts: #0: parent: #0, outer_mark: (crate0::{{expn0}}, Opaque) #1: parent: #0, outer_mark: (crate0::{{expn1}}, Opaque) #2: parent: #0, outer_mark: (crate0::{{expn1}}, Transparent) -#3: parent: #0, outer_mark: (crate2::{{expn1}}, Opaque) -#4: parent: #0, outer_mark: (crate0::{{expn2}}, SemiTransparent) -#5: parent: #0, outer_mark: (crate0::{{expn3}}, Opaque) -#6: parent: #4, outer_mark: (crate0::{{expn3}}, Transparent) -#7: parent: #0, outer_mark: (crate0::{{expn3}}, SemiTransparent) -#8: parent: #0, outer_mark: (crate0::{{expn4}}, Opaque) -#9: parent: #5, outer_mark: (crate0::{{expn4}}, Transparent) -#10: parent: #5, outer_mark: (crate0::{{expn4}}, SemiTransparent) +#3: parent: #0, outer_mark: (crate0::{{expn2}}, SemiTransparent) +#4: parent: #0, outer_mark: (crate0::{{expn3}}, Opaque) +#5: parent: #3, outer_mark: (crate0::{{expn3}}, Transparent) +#6: parent: #0, outer_mark: (crate0::{{expn3}}, SemiTransparent) +#7: parent: #0, outer_mark: (crate0::{{expn4}}, Opaque) +#8: parent: #4, outer_mark: (crate0::{{expn4}}, Transparent) +#9: parent: #4, outer_mark: (crate0::{{expn4}}, SemiTransparent) */ diff --git a/tests/ui/proc-macro/meta-macro.stdout b/tests/ui/proc-macro/meta-macro.stdout index 662682d40..b2d20c237 100644 --- a/tests/ui/proc-macro/meta-macro.stdout +++ b/tests/ui/proc-macro/meta-macro.stdout @@ -1,3 +1,3 @@ -Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) +Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#3) Input: TokenStream [] Respanned: TokenStream [] diff --git a/tests/ui/proc-macro/nested-macro-rules.stdout b/tests/ui/proc-macro/nested-macro-rules.stdout index 311139040..829cfdc0c 100644 --- a/tests/ui/proc-macro/nested-macro-rules.stdout +++ b/tests/ui/proc-macro/nested-macro-rules.stdout @@ -2,45 +2,45 @@ PRINT-BANG INPUT (DISPLAY): FirstStruct PRINT-BANG INPUT (DEBUG): TokenStream [ Ident { ident: "FirstStruct", - span: $DIR/auxiliary/nested-macro-rules.rs:16:14: 16:25 (#7), + span: $DIR/auxiliary/nested-macro-rules.rs:16:14: 16:25 (#6), }, ] PRINT-ATTR INPUT (DISPLAY): struct FirstAttrStruct {} PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/auxiliary/nested-macro-rules.rs:10:32: 10:38 (#6), + span: $DIR/auxiliary/nested-macro-rules.rs:10:32: 10:38 (#5), }, Ident { ident: "FirstAttrStruct", - span: $DIR/auxiliary/nested-macro-rules.rs:16:27: 16:42 (#7), + span: $DIR/auxiliary/nested-macro-rules.rs:16:27: 16:42 (#6), }, Group { delimiter: Brace, stream: TokenStream [], - span: $DIR/auxiliary/nested-macro-rules.rs:10:57: 10:59 (#6), + span: $DIR/auxiliary/nested-macro-rules.rs:10:57: 10:59 (#5), }, ] PRINT-BANG INPUT (DISPLAY): SecondStruct PRINT-BANG INPUT (DEBUG): TokenStream [ Ident { ident: "SecondStruct", - span: $DIR/nested-macro-rules.rs:21:38: 21:50 (#16), + span: $DIR/nested-macro-rules.rs:21:38: 21:50 (#15), }, ] PRINT-ATTR INPUT (DISPLAY): struct SecondAttrStruct {} PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: $DIR/auxiliary/nested-macro-rules.rs:10:32: 10:38 (#15), + span: $DIR/auxiliary/nested-macro-rules.rs:10:32: 10:38 (#14), }, Ident { ident: "SecondAttrStruct", - span: $DIR/nested-macro-rules.rs:21:52: 21:68 (#16), + span: $DIR/nested-macro-rules.rs:21:52: 21:68 (#15), }, Group { delimiter: Brace, stream: TokenStream [], - span: $DIR/auxiliary/nested-macro-rules.rs:10:57: 10:59 (#15), + span: $DIR/auxiliary/nested-macro-rules.rs:10:57: 10:59 (#14), }, ] diff --git a/tests/ui/proc-macro/nested-nonterminal-tokens.stdout b/tests/ui/proc-macro/nested-nonterminal-tokens.stdout index a3d24dd26..4c5550bb0 100644 --- a/tests/ui/proc-macro/nested-nonterminal-tokens.stdout +++ b/tests/ui/proc-macro/nested-nonterminal-tokens.stdout @@ -16,45 +16,45 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/nested-nonterminal-tokens.rs:25:26: 25:27 (#0), }, ], - span: $DIR/nested-nonterminal-tokens.rs:17:41: 17:43 (#4), + span: $DIR/nested-nonterminal-tokens.rs:17:41: 17:43 (#3), }, Punct { ch: '+', spacing: Alone, - span: $DIR/nested-nonterminal-tokens.rs:17:44: 17:45 (#4), + span: $DIR/nested-nonterminal-tokens.rs:17:44: 17:45 (#3), }, Literal { kind: Integer, symbol: "1", suffix: None, - span: $DIR/nested-nonterminal-tokens.rs:17:46: 17:47 (#4), + span: $DIR/nested-nonterminal-tokens.rs:17:46: 17:47 (#3), }, ], - span: $DIR/nested-nonterminal-tokens.rs:18:41: 18:43 (#5), + span: $DIR/nested-nonterminal-tokens.rs:18:41: 18:43 (#4), }, Punct { ch: '+', spacing: Alone, - span: $DIR/nested-nonterminal-tokens.rs:18:44: 18:45 (#5), + span: $DIR/nested-nonterminal-tokens.rs:18:44: 18:45 (#4), }, Literal { kind: Integer, symbol: "2", suffix: None, - span: $DIR/nested-nonterminal-tokens.rs:18:46: 18:47 (#5), + span: $DIR/nested-nonterminal-tokens.rs:18:46: 18:47 (#4), }, ], - span: $DIR/nested-nonterminal-tokens.rs:20:21: 20:23 (#6), + span: $DIR/nested-nonterminal-tokens.rs:20:21: 20:23 (#5), }, Punct { ch: '+', spacing: Alone, - span: $DIR/nested-nonterminal-tokens.rs:20:24: 20:25 (#6), + span: $DIR/nested-nonterminal-tokens.rs:20:24: 20:25 (#5), }, Literal { kind: Integer, symbol: "3", suffix: None, - span: $DIR/nested-nonterminal-tokens.rs:20:26: 20:27 (#6), + span: $DIR/nested-nonterminal-tokens.rs:20:26: 20:27 (#5), }, ] diff --git a/tests/ui/proc-macro/nodelim-groups.stdout b/tests/ui/proc-macro/nodelim-groups.stdout index 6b410f0bf..cdf851b53 100644 --- a/tests/ui/proc-macro/nodelim-groups.stdout +++ b/tests/ui/proc-macro/nodelim-groups.stdout @@ -4,7 +4,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ kind: Str, symbol: "hi", suffix: None, - span: $DIR/nodelim-groups.rs:16:42: 16:46 (#4), + span: $DIR/nodelim-groups.rs:16:42: 16:46 (#3), }, Group { delimiter: None, @@ -44,7 +44,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/nodelim-groups.rs:20:27: 20:28 (#0), }, ], - span: $DIR/nodelim-groups.rs:16:47: 16:51 (#4), + span: $DIR/nodelim-groups.rs:16:47: 16:51 (#3), }, Group { delimiter: Parenthesis, @@ -53,21 +53,21 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ kind: Integer, symbol: "1", suffix: None, - span: $DIR/nodelim-groups.rs:16:53: 16:54 (#4), + span: $DIR/nodelim-groups.rs:16:53: 16:54 (#3), }, Punct { ch: '+', spacing: Alone, - span: $DIR/nodelim-groups.rs:16:55: 16:56 (#4), + span: $DIR/nodelim-groups.rs:16:55: 16:56 (#3), }, Literal { kind: Integer, symbol: "1", suffix: None, - span: $DIR/nodelim-groups.rs:16:57: 16:58 (#4), + span: $DIR/nodelim-groups.rs:16:57: 16:58 (#3), }, ], - span: $DIR/nodelim-groups.rs:16:52: 16:59 (#4), + span: $DIR/nodelim-groups.rs:16:52: 16:59 (#3), }, ] PRINT-BANG INPUT (DISPLAY): "hi" "hello".len() + "world".len() (1 + 1) @@ -76,7 +76,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ kind: Str, symbol: "hi", suffix: None, - span: $DIR/nodelim-groups.rs:16:42: 16:46 (#9), + span: $DIR/nodelim-groups.rs:16:42: 16:46 (#8), }, Group { delimiter: None, @@ -105,12 +105,12 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/nodelim-groups.rs:21:28: 21:30 (#0), }, ], - span: $DIR/nodelim-groups.rs:15:49: 15:54 (#8), + span: $DIR/nodelim-groups.rs:15:49: 15:54 (#7), }, Punct { ch: '+', spacing: Alone, - span: $DIR/nodelim-groups.rs:15:55: 15:56 (#8), + span: $DIR/nodelim-groups.rs:15:55: 15:56 (#7), }, Group { delimiter: None, @@ -136,10 +136,10 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ span: $DIR/nodelim-groups.rs:21:44: 21:46 (#0), }, ], - span: $DIR/nodelim-groups.rs:15:57: 15:62 (#8), + span: $DIR/nodelim-groups.rs:15:57: 15:62 (#7), }, ], - span: $DIR/nodelim-groups.rs:16:47: 16:51 (#9), + span: $DIR/nodelim-groups.rs:16:47: 16:51 (#8), }, Group { delimiter: Parenthesis, @@ -148,20 +148,20 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ kind: Integer, symbol: "1", suffix: None, - span: $DIR/nodelim-groups.rs:16:53: 16:54 (#9), + span: $DIR/nodelim-groups.rs:16:53: 16:54 (#8), }, Punct { ch: '+', spacing: Alone, - span: $DIR/nodelim-groups.rs:16:55: 16:56 (#9), + span: $DIR/nodelim-groups.rs:16:55: 16:56 (#8), }, Literal { kind: Integer, symbol: "1", suffix: None, - span: $DIR/nodelim-groups.rs:16:57: 16:58 (#9), + span: $DIR/nodelim-groups.rs:16:57: 16:58 (#8), }, ], - span: $DIR/nodelim-groups.rs:16:52: 16:59 (#9), + span: $DIR/nodelim-groups.rs:16:52: 16:59 (#8), }, ] diff --git a/tests/ui/proc-macro/nonterminal-expansion.stdout b/tests/ui/proc-macro/nonterminal-expansion.stdout index 4d884348f..b2557af18 100644 --- a/tests/ui/proc-macro/nonterminal-expansion.stdout +++ b/tests/ui/proc-macro/nonterminal-expansion.stdout @@ -3,12 +3,12 @@ PRINT-ATTR_ARGS RE-COLLECTED (DISPLAY): a, line! (), b PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [ Ident { ident: "a", - span: $DIR/nonterminal-expansion.rs:13:27: 13:28 (#4), + span: $DIR/nonterminal-expansion.rs:13:27: 13:28 (#3), }, Punct { ch: ',', spacing: Alone, - span: $DIR/nonterminal-expansion.rs:13:28: 13:29 (#4), + span: $DIR/nonterminal-expansion.rs:13:28: 13:29 (#3), }, Group { delimiter: None, @@ -28,15 +28,15 @@ PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [ span: $DIR/nonterminal-expansion.rs:19:24: 19:26 (#0), }, ], - span: $DIR/nonterminal-expansion.rs:13:30: 13:35 (#4), + span: $DIR/nonterminal-expansion.rs:13:30: 13:35 (#3), }, Punct { ch: ',', spacing: Alone, - span: $DIR/nonterminal-expansion.rs:13:35: 13:36 (#4), + span: $DIR/nonterminal-expansion.rs:13:35: 13:36 (#3), }, Ident { ident: "b", - span: $DIR/nonterminal-expansion.rs:13:37: 13:38 (#4), + span: $DIR/nonterminal-expansion.rs:13:37: 13:38 (#3), }, ] diff --git a/tests/ui/proc-macro/nonterminal-recollect-attr.stdout b/tests/ui/proc-macro/nonterminal-recollect-attr.stdout index 6824395ae..e722ee97d 100644 --- a/tests/ui/proc-macro/nonterminal-recollect-attr.stdout +++ b/tests/ui/proc-macro/nonterminal-recollect-attr.stdout @@ -5,30 +5,30 @@ First recollected: TokenStream [ }, Ident { ident: "struct", - span: $DIR/nonterminal-recollect-attr.rs:14:12: 14:18 (#4), + span: $DIR/nonterminal-recollect-attr.rs:14:12: 14:18 (#3), }, Ident { ident: "Foo", - span: $DIR/nonterminal-recollect-attr.rs:14:19: 14:22 (#4), + span: $DIR/nonterminal-recollect-attr.rs:14:19: 14:22 (#3), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "field", - span: $DIR/nonterminal-recollect-attr.rs:15:13: 15:18 (#4), + span: $DIR/nonterminal-recollect-attr.rs:15:13: 15:18 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/nonterminal-recollect-attr.rs:15:18: 15:19 (#4), + span: $DIR/nonterminal-recollect-attr.rs:15:18: 15:19 (#3), }, Ident { ident: "u8", - span: $DIR/nonterminal-recollect-attr.rs:15:20: 15:22 (#4), + span: $DIR/nonterminal-recollect-attr.rs:15:20: 15:22 (#3), }, ], - span: $DIR/nonterminal-recollect-attr.rs:14:23: 16:10 (#4), + span: $DIR/nonterminal-recollect-attr.rs:14:23: 16:10 (#3), }, ] Second recollected: TokenStream [ @@ -38,29 +38,29 @@ Second recollected: TokenStream [ }, Ident { ident: "struct", - span: $DIR/nonterminal-recollect-attr.rs:14:12: 14:18 (#4), + span: $DIR/nonterminal-recollect-attr.rs:14:12: 14:18 (#3), }, Ident { ident: "Foo", - span: $DIR/nonterminal-recollect-attr.rs:14:19: 14:22 (#4), + span: $DIR/nonterminal-recollect-attr.rs:14:19: 14:22 (#3), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "field", - span: $DIR/nonterminal-recollect-attr.rs:15:13: 15:18 (#4), + span: $DIR/nonterminal-recollect-attr.rs:15:13: 15:18 (#3), }, Punct { ch: ':', spacing: Alone, - span: $DIR/nonterminal-recollect-attr.rs:15:18: 15:19 (#4), + span: $DIR/nonterminal-recollect-attr.rs:15:18: 15:19 (#3), }, Ident { ident: "u8", - span: $DIR/nonterminal-recollect-attr.rs:15:20: 15:22 (#4), + span: $DIR/nonterminal-recollect-attr.rs:15:20: 15:22 (#3), }, ], - span: $DIR/nonterminal-recollect-attr.rs:14:23: 16:10 (#4), + span: $DIR/nonterminal-recollect-attr.rs:14:23: 16:10 (#3), }, ] diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.rs b/tests/ui/proc-macro/nonterminal-token-hygiene.rs index fa52a975b..1e9e90a6b 100644 --- a/tests/ui/proc-macro/nonterminal-token-hygiene.rs +++ b/tests/ui/proc-macro/nonterminal-token-hygiene.rs @@ -3,12 +3,13 @@ // check-pass // compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene // compile-flags: -Z trim-diagnostic-paths=no +// ignore-tidy-linelength // normalize-stdout-test "\d+#" -> "0#" // normalize-stdout-test "expn\d{3,}" -> "expnNNN" +// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" // aux-build:test-macros.rs #![feature(decl_macro)] - #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout index c08e53081..c437853ac 100644 --- a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout +++ b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout @@ -6,19 +6,19 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ stream: TokenStream [ Ident { ident: "struct", - span: $DIR/nonterminal-token-hygiene.rs:31:5: 31:11 (#5), + span: $DIR/nonterminal-token-hygiene.rs:32:5: 32:11 (#4), }, Ident { ident: "S", - span: $DIR/nonterminal-token-hygiene.rs:31:12: 31:13 (#5), + span: $DIR/nonterminal-token-hygiene.rs:32:12: 32:13 (#4), }, Punct { ch: ';', spacing: Alone, - span: $DIR/nonterminal-token-hygiene.rs:31:13: 31:14 (#5), + span: $DIR/nonterminal-token-hygiene.rs:32:13: 32:14 (#4), }, ], - span: $DIR/nonterminal-token-hygiene.rs:21:27: 21:32 (#6), + span: $DIR/nonterminal-token-hygiene.rs:22:27: 22:32 (#5), }, ] #![feature /* 0#0 */(prelude_import)] @@ -28,19 +28,19 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ // check-pass // compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene // compile-flags: -Z trim-diagnostic-paths=no +// ignore-tidy-linelength // normalize-stdout-test "\d+#" -> "0#" // normalize-stdout-test "expn\d{3,}" -> "expnNNN" +// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" // aux-build:test-macros.rs #![feature /* 0#0 */(decl_macro)] - #![no_std /* 0#0 */] #[prelude_import /* 0#1 */] use ::core /* 0#1 */::prelude /* 0#1 */::rust_2015 /* 0#1 */::*; #[macro_use /* 0#1 */] extern crate core /* 0#2 */; -#[macro_use /* 0#1 */] -extern crate compiler_builtins /* 0#2 */; +extern crate compiler_builtins /* NNN */ as _ /* 0#2 */; // Don't load unnecessary hygiene information from std extern crate std /* 0#0 */; @@ -59,9 +59,9 @@ macro_rules! outer } struct S /* 0#0 */; -macro inner /* 0#4 */ { () => { print_bang! { struct S; } } } +macro inner /* 0#3 */ { () => { print_bang! { struct S; } } } -struct S /* 0#5 */; +struct S /* 0#4 */; // OK, not a duplicate definition of `S` fn main /* 0#0 */() {} @@ -71,22 +71,20 @@ Expansions: crate0::{{expn0}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Root crate0::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports) crate0::{{expn2}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "outer") -crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #4, def_site_ctxt: #4, kind: Macro(Bang, "inner") -crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #6, def_site_ctxt: #0, kind: Macro(Bang, "print_bang") +crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #3, def_site_ctxt: #3, kind: Macro(Bang, "inner") +crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #5, def_site_ctxt: #0, kind: Macro(Bang, "print_bang") crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive") crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive") crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "include") -crate2::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports) SyntaxContexts: #0: parent: #0, outer_mark: (crate0::{{expn0}}, Opaque) #1: parent: #0, outer_mark: (crate0::{{expn1}}, Opaque) #2: parent: #0, outer_mark: (crate0::{{expn1}}, Transparent) -#3: parent: #0, outer_mark: (crate2::{{expn1}}, Opaque) -#4: parent: #0, outer_mark: (crate0::{{expn2}}, SemiTransparent) -#5: parent: #0, outer_mark: (crate0::{{expn3}}, Opaque) -#6: parent: #4, outer_mark: (crate0::{{expn3}}, Opaque) -#7: parent: #0, outer_mark: (crate0::{{expn4}}, Opaque) -#8: parent: #6, outer_mark: (crate0::{{expn4}}, Transparent) -#9: parent: #5, outer_mark: (crate0::{{expn4}}, SemiTransparent) +#3: parent: #0, outer_mark: (crate0::{{expn2}}, SemiTransparent) +#4: parent: #0, outer_mark: (crate0::{{expn3}}, Opaque) +#5: parent: #3, outer_mark: (crate0::{{expn3}}, Opaque) +#6: parent: #0, outer_mark: (crate0::{{expn4}}, Opaque) +#7: parent: #5, outer_mark: (crate0::{{expn4}}, Transparent) +#8: parent: #4, outer_mark: (crate0::{{expn4}}, SemiTransparent) */ |