diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-03-20 22:19:52 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-11-30 06:15:20 +0200 |
| commit | fcca22cb4072097fc2cd1ae78ff84c7d59aacda2 (patch) | |
| tree | ff9a90706e343251ea3b7e3f86e46f3401d089f1 /src/test/ui/proc-macro/resolve-error.rs | |
| parent | d3ab4a74efad266155fcd402c8d159af9e443e3d (diff) | |
| download | rust-fcca22cb4072097fc2cd1ae78ff84c7d59aacda2.tar.gz rust-fcca22cb4072097fc2cd1ae78ff84c7d59aacda2.zip | |
tests: move all proc_macro tests from -fulldeps.
Diffstat (limited to 'src/test/ui/proc-macro/resolve-error.rs')
| -rw-r--r-- | src/test/ui/proc-macro/resolve-error.rs | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/resolve-error.rs b/src/test/ui/proc-macro/resolve-error.rs new file mode 100644 index 00000000000..1940151357c --- /dev/null +++ b/src/test/ui/proc-macro/resolve-error.rs @@ -0,0 +1,70 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:derive-foo.rs +// aux-build:derive-clona.rs +// aux-build:attr_proc_macro.rs +// aux-build:bang_proc_macro.rs + +#![feature(custom_attribute)] + +#[macro_use] +extern crate derive_foo; +#[macro_use] +extern crate derive_clona; +extern crate attr_proc_macro; +extern crate bang_proc_macro; + +use attr_proc_macro::attr_proc_macro; +use bang_proc_macro::bang_proc_macro; + +macro_rules! FooWithLongNam { + () => {} +} + +macro_rules! attr_proc_mac { + () => {} +} + +#[derive(FooWithLongNan)] +//~^ ERROR cannot find +struct Foo; + +#[attr_proc_macra] // OK, interpreted as a custom attribute +struct Bar; + +#[FooWithLongNan] // OK, interpreted as a custom attribute +struct Asdf; + +#[derive(Dlone)] +//~^ ERROR cannot find +struct A; + +#[derive(Dlona)] +//~^ ERROR cannot find +struct B; + +#[derive(attr_proc_macra)] +//~^ ERROR cannot find +struct C; + +fn main() { + FooWithLongNama!(); + //~^ ERROR cannot find + + attr_proc_macra!(); + //~^ ERROR cannot find + + Dlona!(); + //~^ ERROR cannot find + + bang_proc_macrp!(); + //~^ ERROR cannot find +} |
