Skip to content

Commit 92226c0

Browse files
address review
1 parent a4954e2 commit 92226c0

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ macro_rules! globbing{
66
}
77
}
88

9-
#[allow(unused_imports)]
10-
#[macro_use]
9+
#[macro_use] // this imports the `RustEmbed` macro with `pub(crate)` visibility
1110
extern crate same_res_ambigious_extern_macro;
12-
globbing! {}
11+
globbing! {} // this imports the same `RustEmbed` macro with `pub` visibility
1312

1413
pub trait RustEmbed {}
1514

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//@ proc-macro: same-res-ambigious-extern-macro.rs
22

3-
#[allow(unused_imports)]
4-
#[macro_use]
3+
#[macro_use] // this imports the `RustEmbed` macro with `pub(crate)` visibility
54
extern crate same_res_ambigious_extern_macro;
5+
// this imports the same `RustEmbed` macro with `pub` visibility
66
pub use same_res_ambigious_extern_macro::*;
77

88
pub trait RustEmbed {}
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
//@ revisions: nightly-fail nightly-pass
2-
//@[nightly-pass] check-pass
3-
//@[nightly-pass] aux-crate: ambigious_extern=same-res-ambigious-extern.rs
1+
//@ revisions: nightly-fail pass
2+
//@[pass] check-pass
3+
//@[pass] aux-crate: ambigious_extern=same-res-ambigious-extern.rs
44
//@[nightly-fail] aux-crate: ambigious_extern=same-res-ambigious-extern-fail.rs
55
// see https://github.com/rust-lang/rust/pull/147196
66

7-
extern crate ambigious_extern;
8-
use ambigious_extern::Embed;
9-
10-
11-
#[derive(Embed)] //[nightly-fail]~ Error: cannot find derive macro `Embed` in this scope
7+
#[derive(ambigious_extern::Embed)] //[nightly-fail]~ Error: cannot find derive macro `Embed` in this scope
128
struct Foo{}
139

1410
fn main(){}

0 commit comments

Comments
 (0)