diff options
Diffstat (limited to 'tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs')
-rw-r--r-- | tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs b/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs new file mode 100644 index 000000000..678b4774d --- /dev/null +++ b/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs @@ -0,0 +1,21 @@ +// edition:2018 + +// This test is similar to `ambiguity-macros.rs`, but nested in a module. + +#![allow(non_camel_case_types)] + +mod foo { + pub use std::io; + //~^ ERROR `std` is ambiguous + + macro_rules! m { + () => { + mod std { + pub struct io; + } + } + } + m!(); +} + +fn main() {} |