]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/resolve-error.rs
Rollup merge of #64895 - davidtwco:issue-64130-async-error-definition, r=nikomatsakis
[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 struct Foo;
25
26 // Interpreted as an unstable custom attribute
27 #[attr_proc_macra] //~ ERROR cannot find attribute `attr_proc_macra` in this scope
28 struct Bar;
29
30 // Interpreted as an unstable custom attribute
31 #[FooWithLongNan] //~ ERROR cannot find attribute `FooWithLongNan` in this scope
32 struct Asdf;
33
34 #[derive(Dlone)]
35 //~^ ERROR cannot find
36 struct A;
37
38 #[derive(Dlona)]
39 //~^ ERROR cannot find
40 struct B;
41
42 #[derive(attr_proc_macra)]
43 //~^ ERROR cannot find
44 struct C;
45
46 fn main() {
47     FooWithLongNama!();
48     //~^ ERROR cannot find
49
50     attr_proc_macra!();
51     //~^ ERROR cannot find
52
53     Dlona!();
54     //~^ ERROR cannot find
55
56     bang_proc_macrp!();
57     //~^ ERROR cannot find
58 }