]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/generate-mod.rs
Rollup merge of #106788 - estebank:elaborate_pred_E0599, r=compiler-errors
[rust.git] / tests / ui / proc-macro / generate-mod.rs
1 // Modules generated by transparent proc macros still acts as barriers for names (issue #50504).
2
3 // aux-build:generate-mod.rs
4
5 extern crate generate_mod;
6
7 struct FromOutside;
8
9 generate_mod::check!(); //~ ERROR cannot find type `FromOutside` in this scope
10                         //~| ERROR cannot find type `Outer` in this scope
11
12 #[generate_mod::check_attr] //~ ERROR cannot find type `FromOutside` in this scope
13                             //~| ERROR cannot find type `OuterAttr` in this scope
14 struct S;
15
16 #[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
17                                      //~| ERROR cannot find type `OuterDerive` in this scope
18 struct Z;
19
20 fn inner_block() {
21     #[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
22                                         //~| ERROR cannot find type `OuterDerive` in this scope
23     struct InnerZ;
24 }
25
26 #[derive(generate_mod::CheckDeriveLint)] //~  ERROR cannot find type `OuterDeriveLint` in this scope
27                                          //~| ERROR cannot find type `FromOutside` in this scope
28 struct W;
29
30 fn main() {}