about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/print-native-static-libs/Makefile6
-rw-r--r--tests/run-make/print-native-static-libs/bar.rs6
-rw-r--r--tests/ui/associated-consts/issue-105330.stderr12
-rw-r--r--tests/ui/attributes/auxiliary/rustc_confusables_across_crate.rs11
-rw-r--r--tests/ui/attributes/rustc_confusables.rs47
-rw-r--r--tests/ui/attributes/rustc_confusables.stderr68
-rw-r--r--tests/ui/impl-trait/issue-102605.stderr16
-rw-r--r--tests/ui/proc-macro/allowed-attr-stmt-expr.stdout12
-rw-r--r--tests/ui/proc-macro/attr-stmt-expr.stdout12
-rw-r--r--tests/ui/proc-macro/capture-macro-rules-invoke.stdout42
-rw-r--r--tests/ui/proc-macro/capture-unglued-token.stdout2
-rw-r--r--tests/ui/proc-macro/dollar-crate-issue-57089.stdout32
-rw-r--r--tests/ui/proc-macro/dollar-crate-issue-62325.stdout44
-rw-r--r--tests/ui/proc-macro/dollar-crate.stdout96
-rw-r--r--tests/ui/proc-macro/expand-to-derive.stdout20
-rw-r--r--tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout166
-rw-r--r--tests/ui/proc-macro/input-interpolated.stdout16
-rw-r--r--tests/ui/proc-macro/issue-75734-pp-paren.stdout6
-rw-r--r--tests/ui/proc-macro/issue-78675-captured-inner-attrs.stdout14
-rw-r--r--tests/ui/proc-macro/issue-80760-empty-stmt.stdout2
-rw-r--r--tests/ui/proc-macro/macro-rules-derive-cfg.stdout38
-rw-r--r--tests/ui/proc-macro/meta-macro-hygiene.stdout29
-rw-r--r--tests/ui/proc-macro/meta-macro.stdout2
-rw-r--r--tests/ui/proc-macro/nested-macro-rules.stdout16
-rw-r--r--tests/ui/proc-macro/nested-nonterminal-tokens.stdout18
-rw-r--r--tests/ui/proc-macro/nodelim-groups.stdout30
-rw-r--r--tests/ui/proc-macro/nonterminal-expansion.stdout10
-rw-r--r--tests/ui/proc-macro/nonterminal-recollect-attr.stdout24
-rw-r--r--tests/ui/proc-macro/nonterminal-token-hygiene.stdout33
-rw-r--r--tests/ui/resolve/bad-expr-path.stderr12
-rw-r--r--tests/ui/resolve/bad-expr-path2.stderr12
-rw-r--r--tests/ui/type-alias/lazy-type-alias-enum-variant.rs17
32 files changed, 509 insertions, 362 deletions
diff --git a/tests/run-make/print-native-static-libs/Makefile b/tests/run-make/print-native-static-libs/Makefile
index 98e72d7696f..a16c8b0f2a4 100644
--- a/tests/run-make/print-native-static-libs/Makefile
+++ b/tests/run-make/print-native-static-libs/Makefile
@@ -5,7 +5,7 @@ include ../tools.mk
 
 all:
 	$(RUSTC) --crate-type rlib -lbar_cli bar.rs
-	$(RUSTC) foo.rs -lfoo_cli --crate-type staticlib --print native-static-libs 2>&1 \
+	$(RUSTC) foo.rs -lfoo_cli -lfoo_cli --crate-type staticlib --print native-static-libs 2>&1 \
 		| grep 'note: native-static-libs: ' \
 		| sed 's/note: native-static-libs: \(.*\)/\1/' > $(TMPDIR)/libs.txt
 
@@ -13,3 +13,7 @@ all:
 	cat $(TMPDIR)/libs.txt | grep -F "systemd" # in foo.rs
 	cat $(TMPDIR)/libs.txt | grep -F "bar_cli"
 	cat $(TMPDIR)/libs.txt | grep -F "foo_cli"
+
+    # make sure that foo_cli and glib-2.0 are not consecutively present
+	cat $(TMPDIR)/libs.txt | grep -Fv "foo_cli -lfoo_cli"
+	cat $(TMPDIR)/libs.txt | grep -Fv "glib-2.0 -lglib-2.0"
diff --git a/tests/run-make/print-native-static-libs/bar.rs b/tests/run-make/print-native-static-libs/bar.rs
index a563bbc2a22..cd9c1c453e5 100644
--- a/tests/run-make/print-native-static-libs/bar.rs
+++ b/tests/run-make/print-native-static-libs/bar.rs
@@ -3,6 +3,7 @@ pub extern "C" fn my_bar_add(left: i32, right: i32) -> i32 {
     // Obviously makes no sense but...
     unsafe {
         g_free(std::ptr::null_mut());
+        g_free2(std::ptr::null_mut());
     }
     left + right
 }
@@ -11,3 +12,8 @@ pub extern "C" fn my_bar_add(left: i32, right: i32) -> i32 {
 extern "C" {
     fn g_free(p: *mut ());
 }
+
+#[link(name = "glib-2.0")]
+extern "C" {
+    fn g_free2(p: *mut ());
+}
diff --git a/tests/ui/associated-consts/issue-105330.stderr b/tests/ui/associated-consts/issue-105330.stderr
index bbafc55dac3..e9fe3a5e514 100644
--- a/tests/ui/associated-consts/issue-105330.stderr
+++ b/tests/ui/associated-consts/issue-105330.stderr
@@ -39,6 +39,12 @@ error[E0562]: `impl Trait` only allowed in function and inherent method return t
 LL | impl TraitWAssocConst for impl Demo {
    |                           ^^^^^^^^^
 
+error[E0131]: `main` function is not allowed to have generic parameters
+  --> $DIR/issue-105330.rs:17:8
+   |
+LL | fn main<A: TraitWAssocConst<A=32>>() {
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters
+
 error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
   --> $DIR/issue-105330.rs:12:11
    |
@@ -101,12 +107,6 @@ note: required by a bound in `foo`
 LL | fn foo<A: TraitWAssocConst<A=32>>() {
    |                            ^^^^ required by this bound in `foo`
 
-error[E0131]: `main` function is not allowed to have generic parameters
-  --> $DIR/issue-105330.rs:17:8
-   |
-LL | fn main<A: TraitWAssocConst<A=32>>() {
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters
-
 error: aborting due to 11 previous errors
 
 Some errors have detailed explanations: E0131, E0271, E0277, E0404, E0562, E0618, E0658.
diff --git a/tests/ui/attributes/auxiliary/rustc_confusables_across_crate.rs b/tests/ui/attributes/auxiliary/rustc_confusables_across_crate.rs
new file mode 100644
index 00000000000..2fb2d3ad4c4
--- /dev/null
+++ b/tests/ui/attributes/auxiliary/rustc_confusables_across_crate.rs
@@ -0,0 +1,11 @@
+#![feature(rustc_attrs)]
+
+pub struct BTreeSet;
+
+impl BTreeSet {
+    #[rustc_confusables("push", "test_b")]
+    pub fn insert(&self) {}
+
+    #[rustc_confusables("pulled")]
+    pub fn pull(&self) {}
+}
diff --git a/tests/ui/attributes/rustc_confusables.rs b/tests/ui/attributes/rustc_confusables.rs
new file mode 100644
index 00000000000..352e91d065f
--- /dev/null
+++ b/tests/ui/attributes/rustc_confusables.rs
@@ -0,0 +1,47 @@
+// aux-build: rustc_confusables_across_crate.rs
+
+#![feature(rustc_attrs)]
+
+extern crate rustc_confusables_across_crate;
+
+use rustc_confusables_across_crate::BTreeSet;
+
+fn main() {
+    // Misspellings (similarly named methods) take precedence over `rustc_confusables`.
+    let x = BTreeSet {};
+    x.inser();
+    //~^ ERROR no method named
+    //~| HELP there is a method with a similar name
+    x.foo();
+    //~^ ERROR no method named
+    x.push();
+    //~^ ERROR no method named
+    //~| HELP you might have meant to use `insert`
+    x.test();
+    //~^ ERROR no method named
+    x.pulled();
+    //~^ ERROR no method named
+    //~| HELP there is a method with a similar name
+}
+
+struct Bar;
+
+impl Bar {
+    #[rustc_confusables()]
+    //~^ ERROR expected at least one confusable name
+    fn baz() {}
+
+    #[rustc_confusables]
+    //~^ ERROR malformed `rustc_confusables` attribute input
+    //~| HELP must be of the form
+    fn qux() {}
+
+    #[rustc_confusables(invalid_meta_item)]
+    //~^ ERROR expected a quoted string literal
+    //~| HELP consider surrounding this with quotes
+    fn quux() {}
+}
+
+#[rustc_confusables("blah")]
+//~^ ERROR attribute should be applied to an inherent method
+fn not_inherent_impl_method() {}
diff --git a/tests/ui/attributes/rustc_confusables.stderr b/tests/ui/attributes/rustc_confusables.stderr
new file mode 100644
index 00000000000..9fd4470cdbb
--- /dev/null
+++ b/tests/ui/attributes/rustc_confusables.stderr
@@ -0,0 +1,68 @@
+error: malformed `rustc_confusables` attribute input
+  --> $DIR/rustc_confusables.rs:34:5
+   |
+LL |     #[rustc_confusables]
+   |     ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
+
+error: attribute should be applied to an inherent method
+  --> $DIR/rustc_confusables.rs:45:1
+   |
+LL | #[rustc_confusables("blah")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: expected at least one confusable name
+  --> $DIR/rustc_confusables.rs:30:5
+   |
+LL |     #[rustc_confusables()]
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0539]: expected a quoted string literal
+  --> $DIR/rustc_confusables.rs:39:25
+   |
+LL |     #[rustc_confusables(invalid_meta_item)]
+   |                         ^^^^^^^^^^^^^^^^^
+   |
+help: consider surrounding this with quotes
+   |
+LL |     #[rustc_confusables("invalid_meta_item")]
+   |                         +                 +
+
+error[E0599]: no method named `inser` found for struct `rustc_confusables_across_crate::BTreeSet` in the current scope
+  --> $DIR/rustc_confusables.rs:12:7
+   |
+LL |     x.inser();
+   |       ^^^^^ help: there is a method with a similar name: `insert`
+
+error[E0599]: no method named `foo` found for struct `rustc_confusables_across_crate::BTreeSet` in the current scope
+  --> $DIR/rustc_confusables.rs:15:7
+   |
+LL |     x.foo();
+   |       ^^^ method not found in `BTreeSet`
+
+error[E0599]: no method named `push` found for struct `rustc_confusables_across_crate::BTreeSet` in the current scope
+  --> $DIR/rustc_confusables.rs:17:7
+   |
+LL |     x.push();
+   |       ^^^^ method not found in `BTreeSet`
+   |
+help: you might have meant to use `insert`
+   |
+LL |     x.insert();
+   |       ~~~~~~
+
+error[E0599]: no method named `test` found for struct `rustc_confusables_across_crate::BTreeSet` in the current scope
+  --> $DIR/rustc_confusables.rs:20:7
+   |
+LL |     x.test();
+   |       ^^^^ method not found in `BTreeSet`
+
+error[E0599]: no method named `pulled` found for struct `rustc_confusables_across_crate::BTreeSet` in the current scope
+  --> $DIR/rustc_confusables.rs:22:7
+   |
+LL |     x.pulled();
+   |       ^^^^^^ help: there is a method with a similar name: `pull`
+
+error: aborting due to 9 previous errors
+
+Some errors have detailed explanations: E0539, E0599.
+For more information about an error, try `rustc --explain E0539`.
diff --git a/tests/ui/impl-trait/issue-102605.stderr b/tests/ui/impl-trait/issue-102605.stderr
index dfe18e43eee..dcb22797173 100644
--- a/tests/ui/impl-trait/issue-102605.stderr
+++ b/tests/ui/impl-trait/issue-102605.stderr
@@ -1,3 +1,11 @@
+error[E0277]: `main` has invalid return type `Option<()>`
+  --> $DIR/issue-102605.rs:11:14
+   |
+LL | fn main() -> Option<()> {
+   |              ^^^^^^^^^^ `main` can only return types that implement `Termination`
+   |
+   = help: consider using `()`, or a `Result`
+
 error[E0308]: mismatched types
   --> $DIR/issue-102605.rs:13:20
    |
@@ -25,14 +33,6 @@ help: try wrapping the expression in `Err`
 LL |     convert_result(Err(foo()))
    |                    ++++     +
 
-error[E0277]: `main` has invalid return type `Option<()>`
-  --> $DIR/issue-102605.rs:11:14
-   |
-LL | fn main() -> Option<()> {
-   |              ^^^^^^^^^^ `main` can only return types that implement `Termination`
-   |
-   = help: consider using `()`, or a `Result`
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0277, E0308.
diff --git a/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout b/tests/ui/proc-macro/allowed-attr-stmt-expr.stdout
index 091862de30f..4f8730053ee 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 f9b2305c735..c6d77e0ed0c 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/capture-macro-rules-invoke.stdout b/tests/ui/proc-macro/capture-macro-rules-invoke.stdout
index b88fbd3e897..01d71ff989b 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 7e6b540332c..a0d2178f000 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/dollar-crate-issue-57089.stdout b/tests/ui/proc-macro/dollar-crate-issue-57089.stdout
index 2622c005d93..de4f0c000b6 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 a91908239c3..c7e72bf4ff5 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 4e169d47e1a..0f5f87ceca2 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/expand-to-derive.stdout b/tests/ui/proc-macro/expand-to-derive.stdout
index a6437982a37..39f00918329 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 686d53e8876..40181efc0b8 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/input-interpolated.stdout b/tests/ui/proc-macro/input-interpolated.stdout
index 34566c78019..6a8789b2c41 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-75734-pp-paren.stdout b/tests/ui/proc-macro/issue-75734-pp-paren.stdout
index 0fda6654ff3..2f7c013e958 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 60a400a5dea..ae5e9400809 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 4b7ed874307..82f52e4bc48 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/macro-rules-derive-cfg.stdout b/tests/ui/proc-macro/macro-rules-derive-cfg.stdout
index 74641058ef3..aee0f966d0f 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/meta-macro-hygiene.stdout b/tests/ui/proc-macro/meta-macro-hygiene.stdout
index 6b7b0c819cc..17b69daa4f0 100644
--- a/tests/ui/proc-macro/meta-macro-hygiene.stdout
+++ b/tests/ui/proc-macro/meta-macro-hygiene.stdout
@@ -1,6 +1,6 @@
-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:24:37: 24:43 (#3) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:24:43: 24:44 (#3) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:44: 24:45 (#3) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:24:45: 24:50 (#3) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:50: 24:51 (#3) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:24:51: 24: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
@@ -18,8 +18,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 /* 442 */ as _ /* 0#1 */;
 // Don't load unnecessary hygiene information from std
 extern crate std /* 0#0 */;
 
@@ -47,23 +46,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 662682d40b2..b2d20c23722 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 31113904041..829cfdc0c33 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 a3d24dd26fe..4c5550bb077 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 6b410f0bfb7..cdf851b535a 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 4d884348f2c..b2557af18ca 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 6824395ae40..e722ee97d4c 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.stdout b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
index c08e5308138..76d54ab2f13 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:31:5: 31:11 (#4),
             },
             Ident {
                 ident: "S",
-                span: $DIR/nonterminal-token-hygiene.rs:31:12: 31:13 (#5),
+                span: $DIR/nonterminal-token-hygiene.rs:31:12: 31:13 (#4),
             },
             Punct {
                 ch: ';',
                 spacing: Alone,
-                span: $DIR/nonterminal-token-hygiene.rs:31:13: 31:14 (#5),
+                span: $DIR/nonterminal-token-hygiene.rs:31:13: 31:14 (#4),
             },
         ],
-        span: $DIR/nonterminal-token-hygiene.rs:21:27: 21:32 (#6),
+        span: $DIR/nonterminal-token-hygiene.rs:21:27: 21:32 (#5),
     },
 ]
 #![feature /* 0#0 */(prelude_import)]
@@ -39,8 +39,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
 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 /* 442 */ as _ /* 0#2 */;
 // Don't load unnecessary hygiene information from std
 extern crate std /* 0#0 */;
 
@@ -59,9 +58,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 +70,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)
 */
diff --git a/tests/ui/resolve/bad-expr-path.stderr b/tests/ui/resolve/bad-expr-path.stderr
index 8261e8e53b0..411130913c8 100644
--- a/tests/ui/resolve/bad-expr-path.stderr
+++ b/tests/ui/resolve/bad-expr-path.stderr
@@ -10,12 +10,6 @@ error[E0425]: cannot find value `arguments` in module `m1`
 LL |     log(debug, m1::arguments);
    |                    ^^^^^^^^^ not found in `m1`
 
-error[E0425]: cannot find function `log` in this scope
-  --> $DIR/bad-expr-path.rs:4:5
-   |
-LL |     log(debug, m1::arguments);
-   |     ^^^ not found in this scope
-
 error[E0580]: `main` function has wrong type
   --> $DIR/bad-expr-path.rs:3:1
    |
@@ -25,6 +19,12 @@ LL | fn main(arguments: Vec<String>) {
    = note: expected fn pointer `fn()`
               found fn pointer `fn(Vec<String>)`
 
+error[E0425]: cannot find function `log` in this scope
+  --> $DIR/bad-expr-path.rs:4:5
+   |
+LL |     log(debug, m1::arguments);
+   |     ^^^ not found in this scope
+
 error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0425, E0580.
diff --git a/tests/ui/resolve/bad-expr-path2.stderr b/tests/ui/resolve/bad-expr-path2.stderr
index 6e11296d9fc..af3ca99c510 100644
--- a/tests/ui/resolve/bad-expr-path2.stderr
+++ b/tests/ui/resolve/bad-expr-path2.stderr
@@ -10,12 +10,6 @@ error[E0423]: expected value, found module `m1::arguments`
 LL |     log(debug, m1::arguments);
    |                ^^^^^^^^^^^^^ not a value
 
-error[E0425]: cannot find function `log` in this scope
-  --> $DIR/bad-expr-path2.rs:6:5
-   |
-LL |     log(debug, m1::arguments);
-   |     ^^^ not found in this scope
-
 error[E0580]: `main` function has wrong type
   --> $DIR/bad-expr-path2.rs:5:1
    |
@@ -25,6 +19,12 @@ LL | fn main(arguments: Vec<String>) {
    = note: expected fn pointer `fn()`
               found fn pointer `fn(Vec<String>)`
 
+error[E0425]: cannot find function `log` in this scope
+  --> $DIR/bad-expr-path2.rs:6:5
+   |
+LL |     log(debug, m1::arguments);
+   |     ^^^ not found in this scope
+
 error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0423, E0425, E0580.
diff --git a/tests/ui/type-alias/lazy-type-alias-enum-variant.rs b/tests/ui/type-alias/lazy-type-alias-enum-variant.rs
new file mode 100644
index 00000000000..78c3159d1c2
--- /dev/null
+++ b/tests/ui/type-alias/lazy-type-alias-enum-variant.rs
@@ -0,0 +1,17 @@
+// Regression test for issue #113736.
+// check-pass
+
+#![feature(lazy_type_alias)]
+
+enum Enum {
+    Unit,
+    Tuple(),
+    Struct {},
+}
+
+fn main() {
+    type Alias = Enum;
+    let _ = Alias::Unit;
+    let _ = Alias::Tuple();
+    let _ = Alias::Struct {};
+}