Skip to content

Conversation

fmease
Copy link
Member

@fmease fmease commented Oct 13, 2025

Follow-up to #145881 and #145747.

TODO:

  • Migrate most of if not the entire rest of the early buffered lints.
  • Complete check-cfg migration if feasible or drop it for now (it's nasty due to it requiring a TyCtxt)
  • Perf everything

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 13, 2025
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
To only update this specific test, also pass `--test-args binding/ambiguity-item.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/binding/ambiguity-item.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/binding/ambiguity-item" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `f` is ambiguous
##[error]  --> /checkout/tests/ui/binding/ambiguity-item.rs:14:13
   |
LL |     let v = f; //~ ERROR `f` is ambiguous
   |             ^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `f` could refer to the function imported here
  --> /checkout/tests/ui/binding/ambiguity-item.rs:6:5
   |
LL | use m::*;
   |     ^^^^
   = help: consider adding an explicit import of `f` to disambiguate
note: `f` could also refer to the function imported here
  --> /checkout/tests/ui/binding/ambiguity-item.rs:11:5
   |
LL | use n::*; // OK, no conflict with `use m::*;`
   |     ^^^^
   = help: consider adding an explicit import of `f` to disambiguate

error[E0759]: `f` is ambiguous
##[error]  --> /checkout/tests/ui/binding/ambiguity-item.rs:16:9
   |
LL |         f => {} //~ ERROR `f` is ambiguous
   |         ^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `f` could refer to the function imported here
  --> /checkout/tests/ui/binding/ambiguity-item.rs:6:5
   |
LL | use m::*;
   |     ^^^^
   = help: consider adding an explicit import of `f` to disambiguate
note: `f` could also refer to the function imported here
  --> /checkout/tests/ui/binding/ambiguity-item.rs:11:5
   |
LL | use n::*; // OK, no conflict with `use m::*;`
   |     ^^^^
   = help: consider adding an explicit import of `f` to disambiguate

error: aborting due to 2 previous errors

---
To only update this specific test, also pass `--test-args entry-point/imported_main_conflict.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/entry-point/imported_main_conflict.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/entry-point/imported_main_conflict" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `main` is ambiguous
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
---
To only update this specific test, also pass `--test-args error-codes/E0659.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/error-codes/E0659.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/error-codes/E0659" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `foo` is ambiguous
##[error]  --> /checkout/tests/ui/error-codes/E0659.rs:15:15
   |
LL |     collider::foo(); //~ ERROR E0659
   |               ^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `foo` could refer to the function imported here
  --> /checkout/tests/ui/error-codes/E0659.rs:10:13
   |
LL |     pub use crate::moon::*;
   |             ^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `foo` to disambiguate
note: `foo` could also refer to the function imported here
  --> /checkout/tests/ui/error-codes/E0659.rs:11:13
   |
LL |     pub use crate::earth::*;
   |             ^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `foo` to disambiguate

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0759`.
------------------------------------------

---- [ui] tests/ui/error-codes/E0659.rs stdout end ----
---- [ui] tests/ui/imports/ambiguous-11.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/ambiguous-11/ambiguous-11.stderr`
diff of stderr:

- error[E0659]: `Error` is ambiguous
+ error[E0759]: `Error` is ambiguous
2   --> $DIR/ambiguous-11.rs:11:9
3    |
4 LL | fn a<E: Error>(_: E) {}

20 
21 error: aborting due to 1 previous error
22 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args imports/ambiguous-11.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/ambiguous-11.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/ambiguous-11" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/ambiguous-11/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0759]: `Error` is ambiguous
##[error]  --> /checkout/tests/ui/imports/ambiguous-11.rs:11:9
   |
LL | fn a<E: Error>(_: E) {}
   |         ^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `Error` could refer to the trait imported here
  --> /checkout/tests/ui/imports/ambiguous-11.rs:9:5
   |
---
------------------------------------------

---- [ui] tests/ui/imports/ambiguous-11.rs stdout end ----
---- [ui] tests/ui/imports/ambiguous-7.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/ambiguous-7/ambiguous-7.stderr`
diff of stderr:

- error[E0659]: `Error` is ambiguous
+ error[E0759]: `Error` is ambiguous
2   --> $DIR/ambiguous-7.rs:15:9
3    |
4 LL | fn a<E: Error>(_: E) {}

20 
21 error: aborting due to 1 previous error
22 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args imports/ambiguous-7.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/ambiguous-7.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/ambiguous-7" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `Error` is ambiguous
##[error]  --> /checkout/tests/ui/imports/ambiguous-7.rs:15:9
   |
LL | fn a<E: Error>(_: E) {}
   |         ^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `Error` could refer to the trait imported here
  --> /checkout/tests/ui/imports/ambiguous-7.rs:14:5
   |
---
------------------------------------------

---- [ui] tests/ui/imports/ambiguous-7.rs stdout end ----
---- [ui] tests/ui/imports/ambiguous-8.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/ambiguous-8/ambiguous-8.stderr`
diff of stderr:

- error[E0659]: `Error` is ambiguous
+ error[E0759]: `Error` is ambiguous
2   --> $DIR/ambiguous-8.rs:11:9
3    |
4 LL | fn a<E: Error>(_: E) {}

20 
21 error: aborting due to 1 previous error
22 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args imports/ambiguous-8.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/ambiguous-8.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/ambiguous-8" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/ambiguous-8/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0759]: `Error` is ambiguous
##[error]  --> /checkout/tests/ui/imports/ambiguous-8.rs:11:9
   |
LL | fn a<E: Error>(_: E) {}
   |         ^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `Error` could refer to the trait imported here
  --> /checkout/tests/ui/imports/ambiguous-8.rs:9:5
   |
---
To only update this specific test, also pass `--test-args imports/extern-prelude-extern-crate-restricted-shadowing.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing/auxiliary"
stdout: none
--- stderr -------------------------------
error: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
##[error]  --> /checkout/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs:19:9
   |
LL |         extern crate std as core;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | define_other_core!();
   | -------------------- in this macro invocation
   |
   = note: this error originates in the macro `define_other_core` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `Vec` is ambiguous
##[error]  --> /checkout/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs:13:9
   |
LL |         Vec::panic!(); //~ ERROR `Vec` is ambiguous
   |         ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `Vec` could refer to the crate imported here
  --> /checkout/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs:5:9
   |
LL |         extern crate std as Vec;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
...
---
To only update this specific test, also pass `--test-args imports/extern-with-ambiguous-1.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/extern-with-ambiguous-1.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/extern-with-ambiguous-1" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/extern-with-ambiguous-1/auxiliary" "--edition=2021"
stdout: none
--- stderr -------------------------------
error[E0759]: `error` is ambiguous
##[error]  --> /checkout/tests/ui/imports/extern-with-ambiguous-1.rs:16:5
   |
---
   = help: consider adding an explicit import of `error` to disambiguate
note: `error` could also refer to the module imported here
  --> /checkout/tests/ui/imports/extern-with-ambiguous-1.rs:15:5
   |
LL | use extern_with_ambiguous_1_extern::*;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `error` to disambiguate

error: aborting due to 1 previous error

---
- error[E0659]: `env` is ambiguous
+ error[E0759]: `env` is ambiguous
2   --> $DIR/glob-shadowing.rs:11:17
3    |
4 LL |         let x = env!("PATH");

14    = help: consider adding an explicit import of `env` to disambiguate
15    = help: or use `self::env` to refer to this macro unambiguously
16 
- error[E0659]: `env` is ambiguous
+ error[E0759]: `env` is ambiguous
18   --> $DIR/glob-shadowing.rs:19:21
19    |
20 LL |             let x = env!("PATH");

29    |             ^^^^^^^^^^^
30    = help: consider adding an explicit import of `env` to disambiguate
31 
- error[E0659]: `fenv` is ambiguous
---
To only update this specific test, also pass `--test-args imports/glob-shadowing.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/glob-shadowing.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/glob-shadowing" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `env` is ambiguous
##[error]  --> /checkout/tests/ui/imports/glob-shadowing.rs:11:17
   |
LL |         let x = env!("PATH"); //~ ERROR `env` is ambiguous
   |                 ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `env` could refer to a macro from prelude
note: `env` could also refer to the macro imported here
  --> /checkout/tests/ui/imports/glob-shadowing.rs:9:9
   |
LL |     use crate::m::*;
   |         ^^^^^^^^^^^
   = help: consider adding an explicit import of `env` to disambiguate
   = help: or use `self::env` to refer to this macro unambiguously

error[E0759]: `env` is ambiguous
##[error]  --> /checkout/tests/ui/imports/glob-shadowing.rs:19:21
   |
LL |             let x = env!("PATH"); //~ ERROR `env` is ambiguous
   |                     ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `env` could refer to a macro from prelude
note: `env` could also refer to the macro imported here
  --> /checkout/tests/ui/imports/glob-shadowing.rs:17:13
   |
LL |         use crate::m::*;
   |             ^^^^^^^^^^^
   = help: consider adding an explicit import of `env` to disambiguate

error[E0759]: `fenv` is ambiguous
##[error]  --> /checkout/tests/ui/imports/glob-shadowing.rs:29:21
   |
LL |             let x = fenv!(); //~ ERROR `fenv` is ambiguous
   |                     ^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
note: `fenv` could refer to the macro imported here
  --> /checkout/tests/ui/imports/glob-shadowing.rs:27:13
   |
LL |         use crate::m::*;
   |             ^^^^^^^^^^^
   = help: consider adding an explicit import of `fenv` to disambiguate
note: `fenv` could also refer to the macro defined here
  --> /checkout/tests/ui/imports/glob-shadowing.rs:25:5
   |
LL |     pub macro fenv($e: expr) { $e }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: use `self::fenv` to refer to this macro unambiguously

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0759`.
------------------------------------------
---
To only update this specific test, also pass `--test-args imports/issue-109148.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/issue-109148.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/issue-109148" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021"
stdout: none
--- stderr -------------------------------
error: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
##[error]  --> /checkout/tests/ui/imports/issue-109148.rs:6:9
   |
---

error[E0759]: `std` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-109148.rs:13:5
   |
LL | use std::mem; //~ ERROR `std` is ambiguous
   |     ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `std` could refer to a built-in crate
note: `std` could also refer to the crate imported here
  --> /checkout/tests/ui/imports/issue-109148.rs:6:9
   |
LL |         extern crate core as std;
---

error[E0759]: `std` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-109148.rs:14:7
   |
LL | use ::std::mem as _; //~ ERROR `std` is ambiguous
   |       ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `std` could refer to a built-in crate
note: `std` could also refer to the crate imported here
  --> /checkout/tests/ui/imports/issue-109148.rs:6:9
   |
LL |         extern crate core as std;
---
To only update this specific test, also pass `--test-args imports/issue-114682-1.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/issue-114682-1.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/issue-114682-1" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `A` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-114682-1.rs:23:5
   |
---
To only update this specific test, also pass `--test-args imports/issue-53269.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/issue-53269.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/issue-53269" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0432]: unresolved import `nonexistent_module`
##[error]  --> /checkout/tests/ui/imports/issue-53269.rs:6:9
   |
LL |     use nonexistent_module::mac; //~ ERROR unresolved import `nonexistent_module`
   |         ^^^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent_module`
   |
help: you might be missing a crate named `nonexistent_module`, add it to your project and import it in your code
   |
LL + extern crate nonexistent_module;
   |

error[E0759]: `mac` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-53269.rs:8:5
   |
LL |     mac!(); //~ ERROR `mac` is ambiguous
   |     ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a `macro_rules` name and a non-`macro_rules` name from another module
note: `mac` could refer to the macro defined here
  --> /checkout/tests/ui/imports/issue-53269.rs:3:1
   |
LL | macro_rules! mac { () => () }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `mac` could also refer to the unresolved item imported here
  --> /checkout/tests/ui/imports/issue-53269.rs:6:9
   |
LL |     use nonexistent_module::mac; //~ ERROR unresolved import `nonexistent_module`
   |         ^^^^^^^^^^^^^^^^^^^^^^^
   = help: use `self::mac` to refer to this unresolved item unambiguously

error: aborting due to 2 previous errors

---
To only update this specific test, also pass `--test-args imports/issue-55884-1.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/issue-55884-1.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/issue-55884-1" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `S` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-55884-1.rs:19:12
   |
LL |     use m::S; //~ ERROR `S` is ambiguous
   |            ^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `S` could refer to the struct imported here
  --> /checkout/tests/ui/imports/issue-55884-1.rs:14:13
   |
---
To only update this specific test, also pass `--test-args imports/issue-57539.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/issue-57539.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/issue-57539" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018"
stdout: none
--- stderr -------------------------------
error[E0759]: `core` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-57539.rs:4:9
   |
LL |     use core; //~ ERROR `core` is ambiguous
   |         ^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `core` could refer to a built-in crate
   = help: use `::core` to refer to this crate unambiguously
note: `core` could also refer to the module imported here
  --> /checkout/tests/ui/imports/issue-57539.rs:5:9
   |
---
- error[E0659]: `issue_56125` is ambiguous
+ error[E0759]: `issue_56125` is ambiguous
24   --> $DIR/issue-56125.rs:6:9
25    |
26 LL |     use issue_56125::last_segment::*;

37    = help: consider adding an explicit import of `issue_56125` to disambiguate
38    = help: or use `self::issue_56125` to refer to this module unambiguously
39 
- error[E0659]: `issue_56125` is ambiguous
---
To only update this specific test, also pass `--test-args imports/issue-56125.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/issue-56125.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/issue-56125" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/issue-56125/auxiliary" "--edition=2018" "--extern" "issue_56125"
stdout: none
--- stderr -------------------------------
error[E0432]: unresolved import `empty::issue_56125`
##[error]  --> /checkout/tests/ui/imports/issue-56125.rs:17:9
   |
LL |     use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
   |         ^^^^^^^^^^^^^^^^^^ no `issue_56125` in `m3::empty`
   |
help: consider importing one of these modules instead
   |
LL -     use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
LL +     use crate::m3::last_segment::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
   |
LL -     use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
LL +     use crate::m3::non_last_segment::non_last_segment::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
   |
LL -     use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
LL +     use ::issue_56125::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
   |
LL -     use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
LL +     use ::issue_56125::last_segment::issue_56125; //~ ERROR unresolved import `empty::issue_56125`
   |
   = and 1 other candidate

error[E0759]: `issue_56125` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-56125.rs:6:9
   |
LL |     use issue_56125::last_segment::*;
   |         ^^^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `issue_56125` could refer to a crate passed with `--extern`
   = help: use `::issue_56125` to refer to this crate unambiguously
note: `issue_56125` could also refer to the module imported here
  --> /checkout/tests/ui/imports/issue-56125.rs:6:9
   |
LL |     use issue_56125::last_segment::*;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `issue_56125` to disambiguate
   = help: or use `self::issue_56125` to refer to this module unambiguously

error[E0759]: `issue_56125` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-56125.rs:11:9
   |
LL |     use issue_56125::non_last_segment::non_last_segment::*;
   |         ^^^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `issue_56125` could refer to a crate passed with `--extern`
   = help: use `::issue_56125` to refer to this crate unambiguously
note: `issue_56125` could also refer to the module imported here
  --> /checkout/tests/ui/imports/issue-56125.rs:11:9
   |
LL |     use issue_56125::non_last_segment::non_last_segment::*;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `issue_56125` to disambiguate
   = help: or use `self::issue_56125` to refer to this module unambiguously

error[E0759]: `issue_56125` is ambiguous
##[error]  --> /checkout/tests/ui/imports/issue-56125.rs:18:9
   |
LL |     use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
   |         ^^^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `issue_56125` could refer to a crate passed with `--extern`
   = help: use `::issue_56125` to refer to this crate unambiguously
note: `issue_56125` could also refer to the module imported here
  --> /checkout/tests/ui/imports/issue-56125.rs:18:9
   |
LL |     use issue_56125::*; //~ ERROR `issue_56125` is ambiguous
   |         ^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `issue_56125` to disambiguate
   = help: or use `self::issue_56125` to refer to this module unambiguously

error: aborting due to 4 previous errors
---
To only update this specific test, also pass `--test-args imports/local-modularized-tricky-fail-1.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/local-modularized-tricky-fail-1.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/local-modularized-tricky-fail-1" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `exported` is ambiguous
##[error]  --> /checkout/tests/ui/imports/local-modularized-tricky-fail-1.rs:29:1
   |
LL | exported!(); //~ ERROR `exported` is ambiguous
   | ^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and a macro-expanded name in the same module during import or macro resolution
note: `exported` could refer to the macro defined here
  --> /checkout/tests/ui/imports/local-modularized-tricky-fail-1.rs:6:5
   |
---
   |
LL |     panic!(); //~ ERROR `panic` is ambiguous
   |     ^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `panic` could refer to a macro from prelude
note: `panic` could also refer to the macro defined here
  --> /checkout/tests/ui/imports/local-modularized-tricky-fail-1.rs:12:5
   |
LL | /     macro_rules! panic {
LL | |         () => ()
LL | |     }
---

error[E0759]: `include` is ambiguous
##[error]  --> /checkout/tests/ui/imports/local-modularized-tricky-fail-1.rs:47:1
   |
LL | include!(); //~ ERROR `include` is ambiguous
   | ^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `include` could refer to a macro from prelude
note: `include` could also refer to the macro defined here
  --> /checkout/tests/ui/imports/local-modularized-tricky-fail-1.rs:18:5
   |
LL | /     macro_rules! include {
LL | |         () => ()
---
To only update this specific test, also pass `--test-args imports/macros.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/macros.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/macros" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/macros/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/imports/macros.rs:16:5
   |
LL |     m! { //~ ERROR ambiguous
   |     ^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and a macro-expanded name in the same module during import or macro resolution
note: `m` could refer to the macro imported here
  --> /checkout/tests/ui/imports/macros.rs:17:13
   |
---

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/imports/macros.rs:29:9
   |
LL |         m! { //~ ERROR ambiguous
   |         ^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro imported here
  --> /checkout/tests/ui/imports/macros.rs:30:17
   |
LL |             use two_macros::n as m;
   |                 ^^^^^^^^^^^^^^^^^^
note: `m` could also refer to the macro imported here
  --> /checkout/tests/ui/imports/macros.rs:22:9
   |
LL |     use two_macros::m;
   |         ^^^^^^^^^^^^^
   = help: use `self::m` to refer to this macro unambiguously

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0759`.
------------------------------------------
---

17    |         ^^^^^^
18    = help: consider adding an explicit import of `bar` to disambiguate
19 
- error[E0659]: `baz` is ambiguous
+ error[E0759]: `baz` is ambiguous
21   --> $DIR/macro-paths.rs:23:5
22    |
23 LL |     baz::m! {

40 
41 error: aborting due to 2 previous errors
42 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args imports/macro-paths.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/macro-paths.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/macro-paths" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/macro-paths/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0759]: `bar` is ambiguous
##[error]  --> /checkout/tests/ui/imports/macro-paths.rs:13:5
   |
LL |     bar::m! { //~ ERROR ambiguous
   |     ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and a macro-expanded name in the same module during import or macro resolution
note: `bar` could refer to the module defined here
  --> /checkout/tests/ui/imports/macro-paths.rs:14:9
   |
LL |         mod bar { pub use two_macros::m; }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `bar` could also refer to the module imported here
  --> /checkout/tests/ui/imports/macro-paths.rs:12:9
   |
LL |     use foo::*;
   |         ^^^^^^
   = help: consider adding an explicit import of `bar` to disambiguate

error[E0759]: `baz` is ambiguous
##[error]  --> /checkout/tests/ui/imports/macro-paths.rs:23:5
   |
LL |     baz::m! { //~ ERROR ambiguous
   |     ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `baz` could refer to the module defined here
  --> /checkout/tests/ui/imports/macro-paths.rs:24:9
   |
LL |         mod baz { pub use two_macros::m; }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `baz` could also refer to the module defined here
  --> /checkout/tests/ui/imports/macro-paths.rs:18:1
   |
LL | / pub mod baz {
LL | |     pub use two_macros::m;
LL | | }
   | |_^
   = help: use `crate::baz` to refer to this module unambiguously

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0759`.
------------------------------------------
---
- error[E0659]: `Foo` is ambiguous
+ error[E0759]: `Foo` is ambiguous
2   --> $DIR/rfc-1560-warning-cycle.rs:9:17
3    |
4 LL |         fn f(_: Foo) {}

20 
21 error: aborting due to 1 previous error
22 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args imports/rfc-1560-warning-cycle.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/rfc-1560-warning-cycle.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/rfc-1560-warning-cycle" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `Foo` is ambiguous
##[error]  --> /checkout/tests/ui/imports/rfc-1560-warning-cycle.rs:9:17
   |
LL |         fn f(_: Foo) {} //~ ERROR `Foo` is ambiguous
   |                 ^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `Foo` could refer to the struct imported here
  --> /checkout/tests/ui/imports/rfc-1560-warning-cycle.rs:7:13
   |
---
To only update this specific test, also pass `--test-args imports/shadow_builtin_macros.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/imports/shadow_builtin_macros.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/shadow_builtin_macros" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/imports/shadow_builtin_macros/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0759]: `panic` is ambiguous
##[error]  --> /checkout/tests/ui/imports/shadow_builtin_macros.rs:15:14
   |
LL |     fn f() { panic!(); } //~ ERROR ambiguous
   |              ^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `panic` could refer to a macro from prelude
note: `panic` could also refer to the macro imported here
  --> /checkout/tests/ui/imports/shadow_builtin_macros.rs:14:9
   |
LL |     use crate::foo::*;
   |         ^^^^^^^^^^^^^
   = help: consider adding an explicit import of `panic` to disambiguate
---
   |
LL |     panic!(); //~ ERROR `panic` is ambiguous
   |     ^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `panic` could refer to a macro from prelude
note: `panic` could also refer to the macro defined here
  --> /checkout/tests/ui/imports/shadow_builtin_macros.rs:30:9
   |
LL |         macro_rules! panic { () => {} }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |     } }
LL |     m!();
   |     ---- in this macro invocation
   = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `n` is ambiguous
##[error]  --> /checkout/tests/ui/imports/shadow_builtin_macros.rs:49:5
   |
LL |     n!(); //~ ERROR ambiguous
   |     ^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
note: `n` could refer to the macro imported here
  --> /checkout/tests/ui/imports/shadow_builtin_macros.rs:48:9
   |
LL |     use crate::bar::*;
   |         ^^^^^^^^^^^^^
   = help: consider adding an explicit import of `n` to disambiguate
   = help: or use `self::n` to refer to this macro unambiguously
note: `n` could also refer to the macro imported here
  --> /checkout/tests/ui/imports/shadow_builtin_macros.rs:36:13
   |
LL | #[macro_use(n)]
   |             ^

error[E0759]: `panic` is ambiguous
##[error]  --> /checkout/tests/ui/imports/shadow_builtin_macros.rs:20:14
   |
LL |     fn f() { panic!(); } //~ ERROR ambiguous
   |              ^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `panic` could refer to a macro from prelude
note: `panic` could also refer to the macro imported here
  --> /checkout/tests/ui/imports/shadow_builtin_macros.rs:19:26
   |
LL |     ::two_macros::m!(use crate::foo::panic;);
   |                          ^^^^^^^^^^^^^^^^^
   = help: use `self::panic` to refer to this macro unambiguously

error: aborting due to 4 previous errors

---
To only update this specific test, also pass `--test-args macros/ambiguity-legacy-vs-modern.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/ambiguity-legacy-vs-modern.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/ambiguity-legacy-vs-modern" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/ambiguity-legacy-vs-modern.rs:31:9
   |
LL |         m!() //~ ERROR `m` is ambiguous
   |         ^ ambiguous name
   |
   = note: ambiguous because of a conflict between a `macro_rules` name and a non-`macro_rules` name from another module
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/ambiguity-legacy-vs-modern.rs:26:5
   |
LL |     macro_rules! m { () => (()) }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/ambiguity-legacy-vs-modern.rs:29:9
   |
LL |         macro m() { 0 }
   |         ^^^^^^^^^^^^^^^

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/ambiguity-legacy-vs-modern.rs:43:5
   |
LL |     m!() //~ ERROR `m` is ambiguous
   |     ^ ambiguous name
   |
   = note: ambiguous because of a conflict between a `macro_rules` name and a non-`macro_rules` name from another module
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/ambiguity-legacy-vs-modern.rs:40:9
   |
LL |         macro_rules! m { () => (()) }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/ambiguity-legacy-vs-modern.rs:36:5
   |
LL |     macro m() { 0 }
---
To only update this specific test, also pass `--test-args macros/issue-78325-inconsistent-resolution.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/issue-78325-inconsistent-resolution.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/issue-78325-inconsistent-resolution" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018"
stdout: none
--- stderr -------------------------------
error: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
##[error]  --> /checkout/tests/ui/macros/issue-78325-inconsistent-resolution.rs:5:9
   |
LL |         extern crate std as core;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | define_other_core!();
   | -------------------- in this macro invocation
   |
   = note: this error originates in the macro `define_other_core` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `core` is ambiguous
##[error]  --> /checkout/tests/ui/macros/issue-78325-inconsistent-resolution.rs:11:5
   |
LL |     core::panic!(); //~ ERROR `core` is ambiguous
   |     ^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `core` could refer to a built-in crate
note: `core` could also refer to the crate imported here
  --> /checkout/tests/ui/macros/issue-78325-inconsistent-resolution.rs:5:9
   |
LL |         extern crate std as core;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | define_other_core!();
   | -------------------- in this macro invocation
   = help: use `crate::core` to refer to this crate unambiguously
   = note: this error originates in the macro `define_other_core` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `core` is ambiguous
##[error]  --> /checkout/tests/ui/macros/issue-78325-inconsistent-resolution.rs:12:7
   |
LL |     ::core::panic!(); //~ ERROR `core` is ambiguous
   |       ^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `core` could refer to a built-in crate
note: `core` could also refer to the crate imported here
  --> /checkout/tests/ui/macros/issue-78325-inconsistent-resolution.rs:5:9
   |
LL |         extern crate std as core;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | define_other_core!();
   | -------------------- in this macro invocation
   = note: this error originates in the macro `define_other_core` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

---
To only update this specific test, also pass `--test-args macros/macro-path-prelude-shadowing.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/macro-path-prelude-shadowing.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/macro-path-prelude-shadowing" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/macro-path-prelude-shadowing/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0759]: `std` is ambiguous
##[error]  --> /checkout/tests/ui/macros/macro-path-prelude-shadowing.rs:29:9
   |
LL |         std::panic!(); //~ ERROR `std` is ambiguous
   |         ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `std` could refer to a built-in crate
note: `std` could also refer to the module imported here
  --> /checkout/tests/ui/macros/macro-path-prelude-shadowing.rs:27:9
   |
LL |     use m2::*; // glob-import user-defined `std`
   |         ^^^^^
   = help: consider adding an explicit import of `std` to disambiguate
   = help: or use `self::std` to refer to this module unambiguously

error: aborting due to 1 previous error
---
---- [ui] tests/ui/macros/macro-shadowing.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/macro-shadowing/macro-shadowing.stderr`
diff of stderr:

10    = note: macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560)
11    = note: this error originates in the macro `m1` (in Nightly builds, run with -Z macro-backtrace for more info)
12 
- error[E0659]: `foo` is ambiguous
+ error[E0759]: `foo` is ambiguous
14   --> $DIR/macro-shadowing.rs:17:1
15    |
---
To only update this specific test, also pass `--test-args macros/macro-shadowing.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/macro-shadowing.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/macro-shadowing" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/macro-shadowing/auxiliary"
stdout: none
--- stderr -------------------------------
error: `macro_two` is already in scope
##[error]  --> /checkout/tests/ui/macros/macro-shadowing.rs:12:5
   |
LL |     #[macro_use] //~ ERROR `macro_two` is already in scope
   |     ^^^^^^^^^^^^
...
LL | m1!();
   | ----- in this macro invocation
   |
   = note: macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560)
   = note: this error originates in the macro `m1` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `foo` is ambiguous
##[error]  --> /checkout/tests/ui/macros/macro-shadowing.rs:17:1
   |
LL | foo!(); //~ ERROR `foo` is ambiguous
   | ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `foo` could refer to the macro defined here
  --> /checkout/tests/ui/macros/macro-shadowing.rs:10:5
   |
LL |     macro_rules! foo { () => {} }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | m1!();
   | ----- in this macro invocation
note: `foo` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/macro-shadowing.rs:5:1
   |
LL | macro_rules! foo { () => {} }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `m1` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 2 previous errors

---
- error[E0659]: `bar` is ambiguous
+ error[E0759]: `bar` is ambiguous
2   --> $DIR/out-of-order-shadowing.rs:5:1
3    |
4 LL | bar!();

19 
20 error: aborting due to 1 previous error
21 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args macros/out-of-order-shadowing.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/out-of-order-shadowing.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/out-of-order-shadowing" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/out-of-order-shadowing/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0759]: `bar` is ambiguous
##[error]  --> /checkout/tests/ui/macros/out-of-order-shadowing.rs:5:1
   |
LL | bar!(); //~ ERROR `bar` is ambiguous
   | ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `bar` could refer to the macro defined here
  --> /checkout/tests/ui/macros/out-of-order-shadowing.rs:4:1
   |
LL | define_macro!(bar);
   | ^^^^^^^^^^^^^^^^^^
note: `bar` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/out-of-order-shadowing.rs:3:1
   |
LL | macro_rules! bar { () => {} }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `define_macro` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

---
- error[E0659]: `m` is ambiguous
+ error[E0759]: `m` is ambiguous
30   --> $DIR/restricted-shadowing-legacy.rs:139:42
31    |
32 LL |         macro_rules! gen_invoc { () => { m!() } }

54    | ---------- in this macro invocation
55    = note: this error originates in the macro `gen_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)
56 
- error[E0659]: `m` is ambiguous
---
- error[E0659]: `m` is ambiguous
+ error[E0759]: `m` is ambiguous
142   --> $DIR/restricted-shadowing-legacy.rs:218:42
143    |
144 LL |         macro_rules! gen_invoc { () => { m!() } }

166    | ---------- in this macro invocation
167    = note: this error originates in the macro `gen_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)
168 
- error[E0659]: `m` is ambiguous
---
- error[E0659]: `m` is ambiguous
+ error[E0759]: `m` is ambiguous
198   --> $DIR/restricted-shadowing-legacy.rs:262:42
199    |
200 LL |         macro_rules! gen_invoc { () => { m!() } }

224 
225 error: aborting due to 8 previous errors
226 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args macros/restricted-shadowing-legacy.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/restricted-shadowing-legacy.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/restricted-shadowing-legacy" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:101:13
   |
LL |             m!(); //~ ERROR `m` is ambiguous
   |             ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:88:9
   |
LL |         macro_rules! m { () => { Right } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:97:9
   |
LL |         macro_rules! m { () => {} }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `gen_gen_inner_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:139:42
   |
LL |         macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous
   |                                          ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:88:9
   |
LL |         macro_rules! m { () => { Right } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:135:9
   |
LL |         macro_rules! m { () => {} }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `gen_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:148:9
   |
LL |         m!(); //~ ERROR `m` is ambiguous
   |         ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:88:9
   |
LL |         macro_rules! m { () => { Right } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:144:9
   |
LL |         macro_rules! m { () => {} }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:164:9
   |
LL |         m!(); //~ ERROR `m` is ambiguous
   |         ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:88:9
   |
LL |         macro_rules! m { () => { Right } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:85:9
   |
LL |         macro_rules! m { () => { Wrong } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:180:13
   |
LL |             m!(); //~ ERROR `m` is ambiguous
   |             ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:88:9
   |
LL |         macro_rules! m { () => { Right } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:85:9
   |
LL |         macro_rules! m { () => { Wrong } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `gen_gen_inner_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:218:42
   |
LL |         macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous
   |                                          ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:88:9
   |
LL |         macro_rules! m { () => { Right } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:85:9
   |
LL |         macro_rules! m { () => { Wrong } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `gen_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:232:9
   |
LL |         m!(); //~ ERROR `m` is ambiguous
   |         ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:88:9
   |
LL |         macro_rules! m { () => { Right } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:227:13
   |
LL |             macro_rules! m { () => {} }
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:262:42
   |
LL |         macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous
   |                                          ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:88:9
   |
LL |         macro_rules! m { () => { Right } }
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-legacy.rs:257:13
   |
LL |             macro_rules! m { () => {} }
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `gen_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)
---
- error[E0659]: `m` is ambiguous
+ error[E0759]: `m` is ambiguous
30   --> $DIR/restricted-shadowing-modern.rs:147:33
31    |
32 LL |             macro gen_invoc() { m!() }

54    | ---------- in this macro invocation
55    = note: this error originates in the macro `gen_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)
56 
- error[E0659]: `m` is ambiguous
---
- error[E0659]: `m` is ambiguous
+ error[E0759]: `m` is ambiguous
142   --> $DIR/restricted-shadowing-modern.rs:233:33
143    |
144 LL |             macro gen_invoc() { m!() }

168 
169 error: aborting due to 6 previous errors
170 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args macros/restricted-shadowing-modern.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/restricted-shadowing-modern.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/restricted-shadowing-modern" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:104:17
   |
LL |                 m!(); //~ ERROR `m` is ambiguous
   |                 ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:91:9
   |
LL |         macro m() { Right }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
---

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:147:33
   |
LL |             macro gen_invoc() { m!() } //~ ERROR `m` is ambiguous
   |                                 ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:91:9
   |
LL |         macro m() { Right }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
---

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:156:13
   |
LL |             m!(); //~ ERROR `m` is ambiguous
   |             ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:91:9
   |
LL |         macro m() { Right }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
---

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:172:13
   |
LL |             m!(); //~ ERROR `m` is ambiguous
   |             ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:91:9
   |
LL |         macro m() { Right }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:87:9
   |
LL |         macro m() { Wrong }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:190:17
   |
LL |                 m!(); //~ ERROR `m` is ambiguous
   |                 ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:91:9
   |
LL |         macro m() { Right }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:87:9
   |
LL |         macro m() { Wrong }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `gen_gen_inner_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0759]: `m` is ambiguous
##[error]  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:233:33
   |
LL |             macro gen_invoc() { m!() } //~ ERROR `m` is ambiguous
   |                                 ^ ambiguous name
...
LL | include!();
   | ---------- in this macro invocation
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
note: `m` could refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:91:9
   |
LL |         macro m() { Right }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
note: `m` could also refer to the macro defined here
  --> /checkout/tests/ui/macros/restricted-shadowing-modern.rs:87:9
   |
LL |         macro m() { Wrong }
   |         ^^^^^^^^^^^^^^^^^^^
...
LL | include!();
   | ---------- in this macro invocation
   = note: this error originates in the macro `gen_invoc` which comes from the expansion of the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)
---
- error[E0659]: `repr` is ambiguous
+ error[E0759]: `repr` is ambiguous
38   --> $DIR/ambiguous-builtin-attrs.rs:21:34
39    |
40 LL | fn non_macro_expanded_location<#[repr(C)] T>() {

49    |     ^^^^^^^^^^^^^^^^
50    = help: use `crate::repr` to refer to this attribute macro unambiguously
51 
- error[E0659]: `repr` is ambiguous
---
To only update this specific test, also pass `--test-args proc-macro/ambiguous-builtin-attrs.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/ambiguous-builtin-attrs" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/ambiguous-builtin-attrs/auxiliary" "--edition=2018" "--extern" "builtin_attrs=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/ambiguous-builtin-attrs/auxiliary/libbuiltin_attrs.so"
stdout: none
--- stderr -------------------------------
error[E0425]: cannot find value `NonExistent` in this scope
##[error]  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:35:5
   |
LL |     NonExistent; //~ ERROR cannot find value `NonExistent` in this scope
   |     ^^^^^^^^^^^ not found in this scope

error[E0759]: `repr` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:10:3
   |
LL | #[repr(C)] //~ ERROR `repr` is ambiguous
   |   ^^^^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a builtin attribute
   = note: `repr` could refer to a built-in attribute
note: `repr` could also refer to the attribute macro imported here
  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:7:5
---

error[E0759]: `repr` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:12:19
   |
LL | #[cfg_attr(all(), repr(C))] //~ ERROR `repr` is ambiguous
   |                   ^^^^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a builtin attribute
   = note: `repr` could refer to a built-in attribute
note: `repr` could also refer to the attribute macro imported here
  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:7:5
---

error[E0759]: `repr` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:21:34
   |
LL | fn non_macro_expanded_location<#[repr(C)] T>() {
   |                                  ^^^^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a builtin attribute
   = note: `repr` could refer to a built-in attribute
note: `repr` could also refer to the attribute macro imported here
  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:7:5
---

error[E0759]: `allow` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:39:3
   |
LL | #[allow(unused)] //~ ERROR `allow` is ambiguous
   |   ^^^^^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a builtin attribute
   = note: `allow` could refer to a built-in attribute
note: `allow` could also refer to the built-in attribute imported here
  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:38:5
---

error[E0759]: `feature` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:4:4
   |
LL | #![feature(decl_macro)] //~ ERROR `feature` is ambiguous
   |    ^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a builtin attribute
   = note: `feature` could refer to a built-in attribute
note: `feature` could also refer to the attribute macro imported here
  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:7:5
---

error[E0517]: attribute should be applied to a struct, enum, or union
##[error]  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:21:39
   |
LL | fn non_macro_expanded_location<#[repr(C)] T>() {
   |                                       ^   - not a struct, enum, or union

error[E0517]: attribute should be applied to a struct, enum, or union
##[error]  --> /checkout/tests/ui/proc-macro/ambiguous-builtin-attrs.rs:25:16
   |
LL |         #[repr(C)]
---
To only update this specific test, also pass `--test-args proc-macro/derive-helper-shadowing.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/proc-macro/derive-helper-shadowing.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/derive-helper-shadowing" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/derive-helper-shadowing/auxiliary" "--edition=2018" "--extern" "test_macros=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/derive-helper-shadowing/auxiliary/libtest_macros.so" "--extern" "derive_helper_shadowing=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/derive-helper-shadowing/auxiliary/libderive_helper_shadowing.so"
stdout: none
--- stderr -------------------------------
error: cannot use a derive helper attribute through an import
##[error]  --> /checkout/tests/ui/proc-macro/derive-helper-shadowing.rs:43:15
   |
LL |             #[renamed] //~ ERROR cannot use a derive helper attribute through an import
   |               ^^^^^^^
   |
note: the derive helper attribute imported here
  --> /checkout/tests/ui/proc-macro/derive-helper-shadowing.rs:42:17
   |
LL |             use empty_helper as renamed;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^

error: cannot find attribute `empty_helper` in this scope
##[error]  --> /checkout/tests/ui/proc-macro/derive-helper-shadowing.rs:39:22
   |
LL |             #[derive(GenHelperUse)] //~ ERROR cannot find attribute `empty_helper` in this scope
   |                      ^^^^^^^^^^^^
   |
   = note: `empty_helper` is an attribute that can be used by the derive macro `Empty`, you might be missing a `derive` attribute
   = note: this error originates in the derive macro `GenHelperUse` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this attribute macro through its public re-export
   |
LL +             use empty_helper;
   |

error: cannot find attribute `empty_helper` in this scope
##[error]  --> /checkout/tests/ui/proc-macro/derive-helper-shadowing.rs:15:11
   |
LL |         #[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope
   |           ^^^^^^^^^^^^
...
LL |             gen_helper_use!();
   |             ----------------- in this macro invocation
   |
   = note: `empty_helper` is an attribute that can be used by the derive macro `Empty`, you might be missing a `derive` attribute
   = note: this error originates in the macro `gen_helper_use` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this attribute macro through its public re-export
   |
LL +             use crate::empty_helper;
   |

error[E0759]: `empty_helper` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/derive-helper-shadowing.rs:20:3
   |
LL | #[empty_helper] //~ ERROR `empty_helper` is ambiguous
   |   ^^^^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a derive helper attribute
note: `empty_helper` could refer to the derive helper attribute defined here
  --> /checkout/tests/ui/proc-macro/derive-helper-shadowing.rs:23:10
   |
---

error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/derive-helper-shadowing.rs:20:3
   |
LL | #[empty_helper] //~ ERROR `empty_helper` is ambiguous
   |   ^^^^^^^^^^^^
...
LL | #[derive(Empty)]
   |          ----- the attribute is introduced here
   |
---
Future incompatibility report: Future breakage diagnostic:
error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/derive-helper-shadowing.rs:20:3
   |
LL | #[empty_helper] //~ ERROR `empty_helper` is ambiguous
   |   ^^^^^^^^^^^^
...
LL | #[derive(Empty)]
   |          ----- the attribute is introduced here
   |
---
To only update this specific test, also pass `--test-args proc-macro/helper-attr-blocked-by-import-ambig.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/helper-attr-blocked-by-import-ambig" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/helper-attr-blocked-by-import-ambig/auxiliary" "--extern" "test_macros=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/helper-attr-blocked-by-import-ambig/auxiliary/libtest_macros.so"
stdout: none
--- stderr -------------------------------
error[E0759]: `empty_helper` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs:7:3
   |
LL | #[empty_helper] //~ ERROR `empty_helper` is ambiguous
   |   ^^^^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a derive helper attribute
note: `empty_helper` could refer to the derive helper attribute defined here
  --> /checkout/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs:10:10
   |
---

error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs:7:3
   |
LL | #[empty_helper] //~ ERROR `empty_helper` is ambiguous
   |   ^^^^^^^^^^^^
...
LL | #[derive(Empty)]
   |          ----- the attribute is introduced here
   |
---
Future incompatibility report: Future breakage diagnostic:
error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs:7:3
   |
LL | #[empty_helper] //~ ERROR `empty_helper` is ambiguous
   |   ^^^^^^^^^^^^
...
LL | #[derive(Empty)]
   |          ----- the attribute is introduced here
   |
---
- error[E0659]: `B` is ambiguous
+ error[E0759]: `B` is ambiguous
32   --> $DIR/proc-macro-attributes.rs:10:3
33    |
34 LL | #[B(D)]

46 LL | #[macro_use]
47    | ^^^^^^^^^^^^
48 
- error[E0659]: `B` is ambiguous
+ error[E0759]: `B` is ambiguous
50   --> $DIR/proc-macro-attributes.rs:13:3
51    |
52 LL | #[B(E = "foo")]

64 LL | #[macro_use]
65    | ^^^^^^^^^^^^
66 
- error[E0659]: `B` is ambiguous
+ error[E0759]: `B` is ambiguous
68   --> $DIR/proc-macro-attributes.rs:16:3
69    |
70 LL | #[B(arbitrary tokens)]

133 
134 error: aborting due to 9 previous errors
135 
- For more information about this error, try `rustc --explain E0659`.
---
To only update this specific test, also pass `--test-args proc-macro/proc-macro-attributes.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/proc-macro/proc-macro-attributes.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/proc-macro-attributes" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/proc-macro-attributes/auxiliary" "--extern" "derive_b=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/proc-macro/proc-macro-attributes/auxiliary/libderive_b.so"
stdout: none
--- stderr -------------------------------
error: cannot find attribute `C` in this scope
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:9:3
   |
LL | #[C] //~ ERROR cannot find attribute `C` in this scope
   |   ^
   |
help: the derive macro `B` accepts the similarly named `B` attribute
   |
LL - #[C] //~ ERROR cannot find attribute `C` in this scope
LL + #[B] //~ ERROR cannot find attribute `C` in this scope
   |

error[E0759]: `B` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:6:3
   |
LL | #[B] //~ ERROR `B` is ambiguous
   |   ^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a derive helper attribute
note: `B` could refer to the derive helper attribute defined here
  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:19:10
   |
---

error[E0759]: `B` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:10:3
   |
LL | #[B(D)] //~ ERROR `B` is ambiguous
   |   ^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a derive helper attribute
note: `B` could refer to the derive helper attribute defined here
  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:19:10
   |
---

error[E0759]: `B` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:13:3
   |
LL | #[B(E = "foo")] //~ ERROR `B` is ambiguous
   |   ^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a derive helper attribute
note: `B` could refer to the derive helper attribute defined here
  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:19:10
   |
---

error[E0759]: `B` is ambiguous
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:16:3
   |
LL | #[B(arbitrary tokens)] //~ ERROR `B` is ambiguous
   |   ^ ambiguous name
   |
   = note: ambiguous because of a name conflict with a derive helper attribute
note: `B` could refer to the derive helper attribute defined here
  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:19:10
   |
---

error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:6:3
   |
LL | #[B] //~ ERROR `B` is ambiguous
   |   ^
...
LL | #[derive(B)]
   |          - the attribute is introduced here
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
   = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default

error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:10:3
   |
LL | #[B(D)] //~ ERROR `B` is ambiguous
   |   ^
...
LL | #[derive(B)]
   |          - the attribute is introduced here
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>

error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:13:3
   |
LL | #[B(E = "foo")] //~ ERROR `B` is ambiguous
   |   ^
...
LL | #[derive(B)]
   |          - the attribute is introduced here
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>

error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:16:3
   |
LL | #[B(arbitrary tokens)] //~ ERROR `B` is ambiguous
   |   ^
...
LL | #[derive(B)]
   |          - the attribute is introduced here
   |
---
Future incompatibility report: Future breakage diagnostic:
error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:6:3
   |
LL | #[B] //~ ERROR `B` is ambiguous
   |   ^
...
LL | #[derive(B)]
   |          - the attribute is introduced here
   |
---
Future breakage diagnostic:
error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:10:3
   |
LL | #[B(D)] //~ ERROR `B` is ambiguous
   |   ^
...
LL | #[derive(B)]
   |          - the attribute is introduced here
   |
---
Future breakage diagnostic:
error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:13:3
   |
LL | #[B(E = "foo")] //~ ERROR `B` is ambiguous
   |   ^
...
LL | #[derive(B)]
   |          - the attribute is introduced here
   |
---
Future breakage diagnostic:
error: derive helper attribute is used before it is introduced
##[error]  --> /checkout/tests/ui/proc-macro/proc-macro-attributes.rs:16:3
   |
LL | #[B(arbitrary tokens)] //~ ERROR `B` is ambiguous
   |   ^
...
LL | #[derive(B)]
   |          - the attribute is introduced here
   |
---
To only update this specific test, also pass `--test-args resolve/issue-105069.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/resolve/issue-105069.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/resolve/issue-105069" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `V` is ambiguous
##[error]  --> /checkout/tests/ui/resolve/issue-105069.rs:2:5
   |
LL | use V; //~ ERROR `V` is ambiguous
   |     ^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `V` could refer to the variant imported here
  --> /checkout/tests/ui/resolve/issue-105069.rs:1:5
   |
---
To only update this specific test, also pass `--test-args resolve/issue-107563-ambiguous-glob-reexports.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/resolve/issue-107563-ambiguous-glob-reexports.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/resolve/issue-107563-ambiguous-glob-reexports" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `A` is ambiguous
##[error]  --> /checkout/tests/ui/resolve/issue-107563-ambiguous-glob-reexports.rs:25:24
   |
---
To only update this specific test, also pass `--test-args resolve/issue-109153.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/resolve/issue-109153.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/resolve/issue-109153" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0759]: `bar` is ambiguous
##[error]  --> /checkout/tests/ui/resolve/issue-109153.rs:11:5
   |
LL | use bar::bar; //~ ERROR `bar` is ambiguous
   |     ^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `bar` could refer to the module imported here
  --> /checkout/tests/ui/resolve/issue-109153.rs:1:5
   |
---
To only update this specific test, also pass `--test-args rust-2018/uniform-paths/ambiguity-macros-nested.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018"
stdout: none
--- stderr -------------------------------
error[E0759]: `std` is ambiguous
##[error]  --> /checkout/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs:8:13
   |
LL |     pub use std::io;
   |             ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `std` could refer to a built-in crate
   = help: use `::std` to refer to this crate unambiguously
note: `std` could also refer to the module defined here
  --> /checkout/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs:13:13
   |
---
To only update this specific test, also pass `--test-args rust-2018/uniform-paths/ambiguity-macros.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/rust-2018/uniform-paths/ambiguity-macros" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018"
stdout: none
--- stderr -------------------------------
error[E0759]: `std` is ambiguous
##[error]  --> /checkout/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs:7:5
   |
LL | use std::io;
   |     ^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `std` could refer to a built-in crate
   = help: use `::std` to refer to this crate unambiguously
note: `std` could also refer to the module defined here
  --> /checkout/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs:12:9
   |
---
To only update this specific test, also pass `--test-args rust-2018/uniform-paths/issue-56596.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rust-2018/uniform-paths/issue-56596.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/rust-2018/uniform-paths/issue-56596" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/rust-2018/uniform-paths/issue-56596/auxiliary" "--edition=2018" "--extern" "issue_56596"
stdout: none
--- stderr -------------------------------
error[E0759]: `issue_56596` is ambiguous
##[error]  --> /checkout/tests/ui/rust-2018/uniform-paths/issue-56596.rs:10:5
   |
LL | use issue_56596; //~ ERROR `issue_56596` is ambiguous
   |     ^^^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
   = note: `issue_56596` could refer to a crate passed with `--extern`
   = help: use `::issue_56596` to refer to this crate unambiguously
note: `issue_56596` could also refer to the module imported here
  --> /checkout/tests/ui/rust-2018/uniform-paths/issue-56596.rs:9:5
   |
LL | use m::*;
   |     ^^^^
   = help: consider adding an explicit import of `issue_56596` to disambiguate

@Urgau
Copy link
Member

Urgau commented Oct 13, 2025

  • Complete check-cfg migration if feasible or drop it for now (it's nasty due to it requiring a TyCtxt)

Yeah, and it's even more complex as check-cfg lints are emitted from both rustc & rustdoc, which do not operate at the same time, rustc is at expansion time, while rustdoc is after expansion (and therefore has direct access to a TyCtxt).

@fmease
Copy link
Member Author

fmease commented Oct 13, 2025

The thing is, while currently only the post-expansion lint pass gets passed a TyCtxt (since your PR), in theory the pre-expansion lint pass has access to the TyCtxt, too, because both run inside create_and_enter_global_ctxt and TyCtxt::crate_name is already fed for the local crate (and I'm pretty decoding from metadata for foreign DefIds should also work inside the pre-expansion pass).

We can easily pass the TyCtxt to the pre-expansion pass that gets run on the root source file (crate root + inline modules) but the problem I was struggling with was passing the TyCtxt to the pre-expansion passes that get run for out-of-line/file modules because this happens in rustc_expand when expanding ModKind::Unloadeds where we only have access to an ExtCtxt1 and a dyn LintStoreExpand but I'm not sure if it's sound (wrt. thread-local storage and query caching and maybe some other hidden assumptions2) to (make rustc_expand depend on rustc_middle and) store a TyCtxt inside ExtCtxt esp. once we parallelize things (CC #145354). That's where I gave up but I should probably just ping the relevant people.

Not being able to name TyCtxt inside rustc_attr_parsing shouldn't that huge of a problem, I'll just create a new proxy trait EarlyTyCtxt that defines crate_name similar to the LintEmitter and HirTyCtxt shenanigans we already have to do.

Footnotes

  1. I still don't know what the Ext stands for. If it really does stand for extended then I must say that's a really non-descriptive name ^^'

  2. I really don't know what I'm talking about here btw. I know that both TyCtxt and ExtCtxt are !Send and !Sync so maybe everything is sufficiently locked down already?

@fmease
Copy link
Member Author

fmease commented Oct 13, 2025

We can easily pass the TyCtxt to the pre-expansion pass

And I know we don't do that right now (we use Option<TyCtxt> as you know) but since I'm already trying to clean things up I was attempting to make TyCtxt unconditionally available to check-cfg. I don't remember if dropping that requirement I've imposed on myself makes the migration easier or not because we probably need to parametrize things over some proxy TyCtxt trait regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants