2018-06-30 19:53:46 +03: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 23:07:06 +03: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 17:13:55 -05:00
|
|
|
//~| WARN this was previously accepted
|
|
|
|
//~| WARN this was previously accepted
|
2018-07-07 23:07:06 +03:00
|
|
|
struct Z;
|
2018-06-30 19:53:46 +03:00
|
|
|
|
2018-08-20 03:35:52 +03: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 17:13:55 -05:00
|
|
|
//~| WARN this was previously accepted
|
|
|
|
//~| WARN this was previously accepted
|
2018-08-20 03:35:52 +03:00
|
|
|
struct InnerZ;
|
|
|
|
}
|
|
|
|
|
2023-01-20 17:13:55 -05:00
|
|
|
#[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
|
2018-07-21 21:14:22 +03:00
|
|
|
struct W;
|
|
|
|
|
2018-06-30 19:53:46 +03:00
|
|
|
fn main() {}
|