diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui-fulldeps/proc-macro/generate-mod.rs | 8 | ||||
| -rw-r--r-- | src/test/ui-fulldeps/proc-macro/generate-mod.stderr | 18 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui-fulldeps/proc-macro/generate-mod.rs b/src/test/ui-fulldeps/proc-macro/generate-mod.rs index b0cccd8728b..6ac6e4f6def 100644 --- a/src/test/ui-fulldeps/proc-macro/generate-mod.rs +++ b/src/test/ui-fulldeps/proc-macro/generate-mod.rs @@ -31,6 +31,14 @@ struct S; //~| WARN this was previously accepted struct Z; +fn inner_block() { + #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope + //~| WARN cannot find type `OuterDerive` in this scope + //~| WARN this was previously accepted + //~| WARN this was previously accepted + struct InnerZ; +} + #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed struct W; diff --git a/src/test/ui-fulldeps/proc-macro/generate-mod.stderr b/src/test/ui-fulldeps/proc-macro/generate-mod.stderr index c024aeffbb0..87e5fe25542 100644 --- a/src/test/ui-fulldeps/proc-macro/generate-mod.stderr +++ b/src/test/ui-fulldeps/proc-macro/generate-mod.stderr @@ -41,6 +41,24 @@ LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside = 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 #50504 <https://github.com/rust-lang/rust/issues/50504> +warning: cannot find type `FromOutside` in this scope + --> $DIR/generate-mod.rs:35:14 + | +LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope + | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import + | + = 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 #50504 <https://github.com/rust-lang/rust/issues/50504> + +warning: cannot find type `OuterDerive` in this scope + --> $DIR/generate-mod.rs:35:14 + | +LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope + | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import + | + = 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 #50504 <https://github.com/rust-lang/rust/issues/50504> + error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0412`. |
