diff options
Diffstat (limited to 'tests/ui/diagnostic_namespace/existing_proc_macros.rs')
-rw-r--r-- | tests/ui/diagnostic_namespace/existing_proc_macros.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ui/diagnostic_namespace/existing_proc_macros.rs b/tests/ui/diagnostic_namespace/existing_proc_macros.rs new file mode 100644 index 000000000..d6d1fb014 --- /dev/null +++ b/tests/ui/diagnostic_namespace/existing_proc_macros.rs @@ -0,0 +1,24 @@ +#![feature(diagnostic_namespace)] +// check-pass +// aux-build:proc-macro-helper.rs + +extern crate proc_macro_helper; + +mod test1 { + use proc_macro_helper::diagnostic; + + #[diagnostic] + struct Foo; + +} + +mod test2 { + mod diagnostic { + pub use proc_macro_helper::diagnostic as on_unimplemented; + } + + #[diagnostic::on_unimplemented] + trait Foo {} +} + +fn main() {} |