]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/resolve-error.rs
Auto merge of #74160 - CAD97:weak-as-unsized-ptr, r=RalfJung
[rust.git] / src / test / ui / proc-macro / resolve-error.rs
1 // aux-build:derive-foo.rs
2 // aux-build:derive-clona.rs
3 // aux-build:test-macros.rs
4
5 #[macro_use]
6 extern crate derive_foo;
7 #[macro_use]
8 extern crate derive_clona;
9 extern crate test_macros;
10
11 use test_macros::empty as bang_proc_macro;
12 use test_macros::empty_attr as attr_proc_macro;
13
14 macro_rules! FooWithLongNam {
15     () => {}
16 }
17
18 macro_rules! attr_proc_mac {
19     () => {}
20 }
21
22 #[derive(FooWithLongNan)]
23 //~^ ERROR cannot find
24 //~| ERROR cannot find
25 struct Foo;
26
27 // Interpreted as an unstable custom attribute
28 #[attr_proc_macra] //~ ERROR cannot find attribute `attr_proc_macra` in this scope
29 struct Bar;
30
31 // Interpreted as an unstable custom attribute
32 #[FooWithLongNan] //~ ERROR cannot find attribute `FooWithLongNan` in this scope
33 struct Asdf;
34
35 #[derive(Dlone)]
36 //~^ ERROR cannot find
37 //~| ERROR cannot find
38 struct A;
39
40 #[derive(Dlona)]
41 //~^ ERROR cannot find
42 //~| ERROR cannot find
43 struct B;
44
45 #[derive(attr_proc_macra)]
46 //~^ ERROR cannot find
47 //~| ERROR cannot find
48 struct C;
49
50 fn main() {
51     FooWithLongNama!();
52     //~^ ERROR cannot find
53
54     attr_proc_macra!();
55     //~^ ERROR cannot find
56
57     Dlona!();
58     //~^ ERROR cannot find
59
60     bang_proc_macrp!();
61     //~^ ERROR cannot find
62 }