diff options
| author | est31 <MTest31@outlook.com> | 2015-12-29 14:00:38 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2015-12-30 16:23:49 +0100 |
| commit | 1bbcceb9f6c21ad236eda0af1b2fa8928c3d32d6 (patch) | |
| tree | b8b5b49cc45fc603f18065751fb421f65303d68a /src/test/parse-fail | |
| parent | f4eb44e4df5abaf2124d48f45cc4c8b1429d6bfa (diff) | |
| download | rust-1bbcceb9f6c21ad236eda0af1b2fa8928c3d32d6.tar.gz rust-1bbcceb9f6c21ad236eda0af1b2fa8928c3d32d6.zip | |
Move pub-macro-rules.rs test to parse-fail directory
Diffstat (limited to 'src/test/parse-fail')
| -rw-r--r-- | src/test/parse-fail/pub-macro-rules.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/parse-fail/pub-macro-rules.rs b/src/test/parse-fail/pub-macro-rules.rs new file mode 100644 index 00000000000..93b992f2f8a --- /dev/null +++ b/src/test/parse-fail/pub-macro-rules.rs @@ -0,0 +1,27 @@ +// Copyright 2015 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. + +#[macro_use] mod bleh { + pub macro_rules! foo { //~ ERROR can't qualify macro_rules invocation with `pub` + //~^ HELP did you mean #[macro_export]? + ($n:ident) => ( + fn $n () -> i32 { + 1 + } + ) + } + +} + +foo!(meh); + +fn main() { + println!("{}", meh()); +} |
