File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed
Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ //@ build-fail
2+ //@ aux-crate: ambiguous_reachable_extern=ambiguous-reachable-extern.rs
3+
4+ #![ allow( ambiguous_glob_imports) ]
5+
6+ fn main ( ) {
7+ ambiguous_reachable_extern:: generic :: < u8 > ( ) ;
8+ }
9+
10+ //~? ERROR missing optimized MIR
Original file line number Diff line number Diff line change 1+ error: missing optimized MIR for `ambiguous_reachable_extern::m1::generic::<u8>` in the crate `ambiguous_reachable_extern`
2+ |
3+ note: missing optimized MIR for this item (was the crate `ambiguous_reachable_extern` compiled with `--emit=metadata`?)
4+ --> $DIR/auxiliary/ambiguous-reachable-extern.rs:2:5
5+ |
6+ LL | pub fn generic<T>() {
7+ | ^^^^^^^^^^^^^^^^^^^
8+
9+ error: aborting due to 1 previous error
10+
11+ Future incompatibility report: Future breakage diagnostic:
12+ warning: `generic` is ambiguous
13+ --> $DIR/ambiguous-reachable.rs:7:33
14+ |
15+ LL | ambiguous_reachable_extern::generic::<u8>();
16+ | ^^^^^^^ ambiguous name
17+ |
18+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
19+ = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
20+ = note: ambiguous because of multiple glob imports of a name in the same module
21+ note: `generic` could refer to the function defined here
22+ --> $DIR/auxiliary/ambiguous-reachable-extern.rs:13:9
23+ |
24+ LL | pub use m1::*;
25+ | ^^
26+ note: `generic` could also refer to the function defined here
27+ --> $DIR/auxiliary/ambiguous-reachable-extern.rs:14:9
28+ |
29+ LL | pub use m2::*;
30+ | ^^
31+
Original file line number Diff line number Diff line change 1+ mod m1 {
2+ pub fn generic < T > ( ) {
3+ let x = 10 ;
4+ let y = 11 ;
5+ println ! ( "hello {x} world {:?}" , y) ;
6+ }
7+ }
8+
9+ mod m2 {
10+ pub fn generic ( ) { }
11+ }
12+
13+ pub use m1:: * ;
14+ pub use m2:: * ;
You can’t perform that action at this time.
0 commit comments