2018-06-30 11:53:46 -05: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 15:07:06 -05: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-14 19:49:08 -05:00
|
|
|
#[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
|
|
|
|
//~| ERROR cannot find type `OuterDerive` in this scope
|
2023-01-20 16:13:55 -06:00
|
|
|
//~| WARN this was previously accepted
|
|
|
|
//~| WARN this was previously accepted
|
2018-07-07 15:07:06 -05:00
|
|
|
struct Z;
|
2018-06-30 11:53:46 -05:00
|
|
|
|
2018-08-19 19:35:52 -05:00
|
|
|
fn inner_block() {
|
2021-08-14 19:49:08 -05:00
|
|
|
#[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
|
|
|
|
//~| ERROR cannot find type `OuterDerive` in this scope
|
2023-01-20 16:13:55 -06:00
|
|
|
//~| WARN this was previously accepted
|
|
|
|
//~| WARN this was previously accepted
|
2018-08-19 19:35:52 -05:00
|
|
|
struct InnerZ;
|
|
|
|
}
|
|
|
|
|
2023-01-20 16:13:55 -06:00
|
|
|
#[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
|
2018-07-21 13:14:22 -05:00
|
|
|
struct W;
|
|
|
|
|
2018-06-30 11:53:46 -05:00
|
|
|
fn main() {}
|