diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-05-21 01:58:42 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-05-21 23:02:34 +0000 |
| commit | 3c421ac67ef55541de73689f2f6bbabd7ddb0a9a (patch) | |
| tree | 1a3efb2825e2001c3df370153fae2a1f36c48d30 | |
| parent | ba8b9324d6c10ce151de50057472f5c258476655 (diff) | |
| download | rust-3c421ac67ef55541de73689f2f6bbabd7ddb0a9a.tar.gz rust-3c421ac67ef55541de73689f2f6bbabd7ddb0a9a.zip | |
Test diagnostics
| -rw-r--r-- | src/test/compile-fail/macro-error.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/compile-fail/macro-error.rs b/src/test/compile-fail/macro-error.rs index 817b675aedf..a69188da58d 100644 --- a/src/test/compile-fail/macro-error.rs +++ b/src/test/compile-fail/macro-error.rs @@ -8,12 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Check that we report errors at macro definition, not expansion. +#![feature(type_macros)] macro_rules! foo { ($a:expr) => $a; //~ ERROR macro rhs must be delimited } fn main() { - foo!(0); + foo!(0); // Check that we report errors at macro definition, not expansion. + + let _: cfg!(foo) = (); //~ ERROR non-type macro in type position + derive!(); //~ ERROR `derive` can only be used in attributes } |
