diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-04-08 23:41:27 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-04-08 23:41:27 +0000 |
| commit | 417a6df9b0764ff086d71fff9808a31715e9cd0d (patch) | |
| tree | daff0afd212ba7325249fb5dd8cfaf41a4808b86 | |
| parent | 0ea66f35a95e3662498881398298dcc553294d5a (diff) | |
| download | rust-417a6df9b0764ff086d71fff9808a31715e9cd0d.tar.gz rust-417a6df9b0764ff086d71fff9808a31715e9cd0d.zip | |
Add regression test
| -rw-r--r-- | src/test/compile-fail/expanded-cfg.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/compile-fail/expanded-cfg.rs b/src/test/compile-fail/expanded-cfg.rs new file mode 100644 index 00000000000..2f74aeba9eb --- /dev/null +++ b/src/test/compile-fail/expanded-cfg.rs @@ -0,0 +1,26 @@ +// 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. + +#![feature(rustc_attrs)] + +macro_rules! mac { + {} => { + #[cfg(attr)] + mod m { + #[lang_item] + fn f() {} + } + } +} + +mac! {} + +#[rustc_error] +fn main() {} //~ ERROR compilation successful |
