2018-06-30 16:53:46 +00:00
|
|
|
// Modules generated by transparent proc macros still acts as barriers for names (issue #50504).
|
|
|
|
|
|
|
|
//@ aux-build:generate-mod.rs
|
|
|
|
|
|
|
|
extern crate generate_mod;
|
|
|
|
|
2018-07-07 20:07:06 +00:00
|
|
|
struct FromOutside;
|
|
|
|
|
|
|
|
generate_mod::check!(); //~ ERROR cannot find type `FromOutside` in this scope
|
|
|
|
//~| ERROR cannot find type `Outer` in this scope
|
|
|
|
|
|
|
|
#[generate_mod::check_attr] //~ ERROR cannot find type `FromOutside` in this scope
|
|
|
|
//~| ERROR cannot find type `OuterAttr` in this scope
|
|
|
|
struct S;
|
|
|
|
|
2021-08-15 00:49:08 +00:00
|
|
|
#[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
|
|
|
|
//~| ERROR cannot find type `OuterDerive` in this scope
|
2023-01-20 22:13:55 +00:00
|
|
|
//~| WARN this was previously accepted
|
|
|
|
//~| WARN this was previously accepted
|
2018-07-07 20:07:06 +00:00
|
|
|
struct Z;
|
2018-06-30 16:53:46 +00:00
|
|
|
|
2018-08-20 00:35:52 +00:00
|
|
|
fn inner_block() {
|
2021-08-15 00:49:08 +00:00
|
|
|
#[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
|
|
|
|
//~| ERROR cannot find type `OuterDerive` in this scope
|
2023-01-20 22:13:55 +00:00
|
|
|
//~| WARN this was previously accepted
|
|
|
|
//~| WARN this was previously accepted
|
2018-08-20 00:35:52 +00:00
|
|
|
struct InnerZ;
|
|
|
|
}
|
|
|
|
|
2023-01-20 22:13:55 +00:00
|
|
|
#[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
|
2018-07-21 18:14:22 +00:00
|
|
|
struct W;
|
|
|
|
|
2018-06-30 16:53:46 +00:00
|
|
|
fn main() {}
|