Skip to content

Commit a4954e2

Browse files
failing test as well
1 parent 58a0cfa commit a4954e2

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//@ proc-macro: same-res-ambigious-extern-macro.rs
2+
3+
macro_rules! globbing{
4+
() => {
5+
pub use same_res_ambigious_extern_macro::*;
6+
}
7+
}
8+
9+
#[allow(unused_imports)]
10+
#[macro_use]
11+
extern crate same_res_ambigious_extern_macro;
12+
globbing! {}
13+
14+
pub trait RustEmbed {}
15+
16+
pub use RustEmbed as Embed;

tests/ui/imports/auxiliary/same-res-ambigious-extern-macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ use proc_macro::TokenStream;
33

44
#[proc_macro_derive(RustEmbed)]
55
pub fn rust_embed_derive(_input: TokenStream) -> TokenStream {
6-
TokenStream::new()
6+
TokenStream::new()
77
}
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//@ check-pass
2-
//@ aux-build: same-res-ambigious-extern.rs
1+
//@ revisions: nightly-fail nightly-pass
2+
//@[nightly-pass] check-pass
3+
//@[nightly-pass] aux-crate: ambigious_extern=same-res-ambigious-extern.rs
4+
//@[nightly-fail] aux-crate: ambigious_extern=same-res-ambigious-extern-fail.rs
5+
// see https://github.com/rust-lang/rust/pull/147196
36

4-
extern crate same_res_ambigious_extern;
5-
use same_res_ambigious_extern::Embed;
7+
extern crate ambigious_extern;
8+
use ambigious_extern::Embed;
69

710

8-
#[derive(Embed)]
11+
#[derive(Embed)] //[nightly-fail]~ Error: cannot find derive macro `Embed` in this scope
912
struct Foo{}
1013

1114
fn main(){}

0 commit comments

Comments
 (0)