rust/tests/ui/imports/ambiguous-glob-vs-expanded-extern.stderr
Esteban Küber 1bd7934d89 Point at span within local macros even when error happens in nested external macro
```
error[E0308]: mismatched types
  --> $DIR/macro-span-caller-replacement.rs:5:17
   |
LL |             s = format!("{arg}");
   |                 ^^^^^^^^^^^^^^^^ expected `&str`, found `String`
...
LL |     macro_with_format!();
   |     -------------------- in this macro invocation
   |
   = note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info)
```
2025-12-10 19:27:40 +00:00

53 lines
2.4 KiB
Text

error: `mac` is ambiguous
--> $DIR/ambiguous-glob-vs-expanded-extern.rs:4:23
|
LL | glob_vs_expanded::mac!();
| ^^^ ambiguous name
|
= 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 #114095 <https://github.com/rust-lang/rust/issues/114095>
= 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: `mac` could refer to the macro defined here
--> $DIR/auxiliary/glob-vs-expanded.rs:9:13
|
LL | () => { pub macro mac() {} }
| ^^^^^^^^^^^^^
LL | }
LL | define_mac!();
| ------------- in this macro invocation
note: `mac` could also refer to the macro defined here
--> $DIR/auxiliary/glob-vs-expanded.rs:5:9
|
LL | pub use inner::*;
| ^^^^^
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
= note: this error originates in the macro `define_mac` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 1 previous error
Future incompatibility report: Future breakage diagnostic:
error: `mac` is ambiguous
--> $DIR/ambiguous-glob-vs-expanded-extern.rs:4:23
|
LL | glob_vs_expanded::mac!();
| ^^^ ambiguous name
|
= 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 #114095 <https://github.com/rust-lang/rust/issues/114095>
= 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: `mac` could refer to the macro defined here
--> $DIR/auxiliary/glob-vs-expanded.rs:9:13
|
LL | () => { pub macro mac() {} }
| ^^^^^^^^^^^^^
LL | }
LL | define_mac!();
| ------------- in this macro invocation
note: `mac` could also refer to the macro defined here
--> $DIR/auxiliary/glob-vs-expanded.rs:5:9
|
LL | pub use inner::*;
| ^^^^^
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
= note: this error originates in the macro `define_mac` (in Nightly builds, run with -Z macro-backtrace for more info)