Skip to content

Commit 99de60b

Browse files
make tests pass
1 parent 92226c0 commit 99de60b

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition:2018
12
//@ proc-macro: same-res-ambigious-extern-macro.rs
23

34
macro_rules! globbing{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2018
12
extern crate proc_macro;
23
use proc_macro::TokenStream;
34

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition:2018
12
//@ proc-macro: same-res-ambigious-extern-macro.rs
23

34
#[macro_use] // this imports the `RustEmbed` macro with `pub(crate)` visibility
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
error[E0603]: derive macro `Embed` is private
2+
--> $DIR/same-res-ambigious.rs:8:28
3+
|
4+
LL | #[derive(ambigious_extern::Embed)]
5+
| ^^^^^ private derive macro
6+
|
7+
note: the derive macro `Embed` is defined here
8+
--> $DIR/auxiliary/same-res-ambigious-extern-fail.rs:16:9
9+
|
10+
LL | pub use RustEmbed as Embed;
11+
| ^^^^^^^^^
12+
help: import `Embed` directly
13+
|
14+
LL - #[derive(ambigious_extern::Embed)]
15+
LL + #[derive(same_res_ambigious_extern_macro::RustEmbed)]
16+
|
17+
18+
error: aborting due to 1 previous error
19+
20+
For more information about this error, try `rustc --explain E0603`.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
//@ edition: 2018
12
//@ revisions: nightly-fail pass
23
//@[pass] check-pass
34
//@[pass] aux-crate: ambigious_extern=same-res-ambigious-extern.rs
45
//@[nightly-fail] aux-crate: ambigious_extern=same-res-ambigious-extern-fail.rs
56
// see https://github.com/rust-lang/rust/pull/147196
67

7-
#[derive(ambigious_extern::Embed)] //[nightly-fail]~ Error: cannot find derive macro `Embed` in this scope
8+
#[derive(ambigious_extern::Embed)] //[nightly-fail]~ ERROR: derive macro `Embed` is private
89
struct Foo{}
910

1011
fn main(){}

0 commit comments

Comments
 (0)