diff options
| -rw-r--r-- | src/test/auxiliary/macro_non_reexport_2.rs | 19 | ||||
| -rw-r--r-- | src/test/compile-fail/macro-no-implicit-reexport.rs | 20 | 
2 files changed, 39 insertions, 0 deletions
| diff --git a/src/test/auxiliary/macro_non_reexport_2.rs b/src/test/auxiliary/macro_non_reexport_2.rs new file mode 100644 index 00000000000..910fcd2e367 --- /dev/null +++ b/src/test/auxiliary/macro_non_reexport_2.rs @@ -0,0 +1,19 @@ +// 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. + +#![crate_type = "dylib"] + +// Since we load a serialized macro with all its attributes, accidentally +// re-exporting a `#[macro_export] macro_rules!` is something of a concern! +// +// We avoid it at the moment only because of the order in which we do things. + +#[macro_use] #[no_link] +extern crate macro_reexport_1; diff --git a/src/test/compile-fail/macro-no-implicit-reexport.rs b/src/test/compile-fail/macro-no-implicit-reexport.rs new file mode 100644 index 00000000000..4a427f121fc --- /dev/null +++ b/src/test/compile-fail/macro-no-implicit-reexport.rs @@ -0,0 +1,20 @@ +// 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. + +// aux-build:macro_reexport_1.rs +// aux-build:macro_non_reexport_2.rs +// ignore-stage1 + +#[macro_use] #[no_link] +extern crate macro_non_reexport_2; + +fn main() { + assert_eq!(reexported!(), 3u); //~ ERROR macro undefined +} | 
