diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-09-08 22:19:53 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-09-13 14:48:50 +0300 |
| commit | beb3b5d22c709c19600ca6514d94f9cf1be44dca (patch) | |
| tree | de1432273793bc9c6b2716d6f0f51344d265bcb1 /src/test/ui | |
| parent | 994cdd918589535d705177545bf503cd0c3c5148 (diff) | |
| download | rust-beb3b5d22c709c19600ca6514d94f9cf1be44dca.tar.gz rust-beb3b5d22c709c19600ca6514d94f9cf1be44dca.zip | |
resolve: Introduce two sub-namespaces in macro namespace
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/issues/issue-11692-2.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-11692-2.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/macros/macro-path-prelude-fail-3.rs | 13 | ||||
| -rw-r--r-- | src/test/ui/macros/macro-path-prelude-fail-3.stderr | 10 | ||||
| -rw-r--r-- | src/test/ui/macros/macro-path-prelude-fail-4.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/macros/macro-path-prelude-fail-4.stderr | 8 |
6 files changed, 17 insertions, 24 deletions
diff --git a/src/test/ui/issues/issue-11692-2.rs b/src/test/ui/issues/issue-11692-2.rs index 2e94a27838e..a4b8b48384d 100644 --- a/src/test/ui/issues/issue-11692-2.rs +++ b/src/test/ui/issues/issue-11692-2.rs @@ -9,5 +9,5 @@ // except according to those terms. fn main() { - concat!(test!()); //~ ERROR `test` can only be used in attributes + concat!(test!()); //~ ERROR cannot find macro `test!` in this scope } diff --git a/src/test/ui/issues/issue-11692-2.stderr b/src/test/ui/issues/issue-11692-2.stderr index 186c59a6149..85f600dbff2 100644 --- a/src/test/ui/issues/issue-11692-2.stderr +++ b/src/test/ui/issues/issue-11692-2.stderr @@ -1,7 +1,7 @@ -error: `test` can only be used in attributes +error: cannot find macro `test!` in this scope --> $DIR/issue-11692-2.rs:12:13 | -LL | concat!(test!()); //~ ERROR `test` can only be used in attributes +LL | concat!(test!()); //~ ERROR cannot find macro `test!` in this scope | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-path-prelude-fail-3.rs b/src/test/ui/macros/macro-path-prelude-fail-3.rs index c706b8f613d..597053d6251 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-3.rs +++ b/src/test/ui/macros/macro-path-prelude-fail-3.rs @@ -1,16 +1,3 @@ -// Copyright 2018 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. - -#[derive(inline)] //~ ERROR cannot find derive macro `inline` in this scope -struct S; - fn main() { inline!(); //~ ERROR cannot find macro `inline!` in this scope } diff --git a/src/test/ui/macros/macro-path-prelude-fail-3.stderr b/src/test/ui/macros/macro-path-prelude-fail-3.stderr index a8edf54d220..17723251181 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-3.stderr +++ b/src/test/ui/macros/macro-path-prelude-fail-3.stderr @@ -1,14 +1,8 @@ -error: cannot find derive macro `inline` in this scope - --> $DIR/macro-path-prelude-fail-3.rs:11:10 - | -LL | #[derive(inline)] //~ ERROR cannot find derive macro `inline` in this scope - | ^^^^^^ - error: cannot find macro `inline!` in this scope - --> $DIR/macro-path-prelude-fail-3.rs:15:5 + --> $DIR/macro-path-prelude-fail-3.rs:2:5 | LL | inline!(); //~ ERROR cannot find macro `inline!` in this scope | ^^^^^^ help: you could try the macro: `line` -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/src/test/ui/macros/macro-path-prelude-fail-4.rs b/src/test/ui/macros/macro-path-prelude-fail-4.rs new file mode 100644 index 00000000000..283427b9ace --- /dev/null +++ b/src/test/ui/macros/macro-path-prelude-fail-4.rs @@ -0,0 +1,4 @@ +#[derive(inline)] //~ ERROR expected a macro, found built-in attribute +struct S; + +fn main() {} diff --git a/src/test/ui/macros/macro-path-prelude-fail-4.stderr b/src/test/ui/macros/macro-path-prelude-fail-4.stderr new file mode 100644 index 00000000000..e354f345a4c --- /dev/null +++ b/src/test/ui/macros/macro-path-prelude-fail-4.stderr @@ -0,0 +1,8 @@ +error: expected a macro, found built-in attribute + --> $DIR/macro-path-prelude-fail-4.rs:1:10 + | +LL | #[derive(inline)] //~ ERROR expected a macro, found built-in attribute + | ^^^^^^ + +error: aborting due to previous error + |
