about summary refs log tree commit diff
path: root/tests/ui/deriving/built-in-proc-macro-scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/deriving/built-in-proc-macro-scope.rs')
-rw-r--r--tests/ui/deriving/built-in-proc-macro-scope.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/deriving/built-in-proc-macro-scope.rs b/tests/ui/deriving/built-in-proc-macro-scope.rs
new file mode 100644
index 00000000000..41c95f63b13
--- /dev/null
+++ b/tests/ui/deriving/built-in-proc-macro-scope.rs
@@ -0,0 +1,25 @@
+//@ check-pass
+//@ aux-build: another-proc-macro.rs
+//@ compile-flags: -Zunpretty=expanded
+
+#![feature(derive_smart_pointer)]
+
+#[macro_use]
+extern crate another_proc_macro;
+
+use another_proc_macro::{pointee, AnotherMacro};
+
+#[derive(core::marker::SmartPointer)]
+#[repr(transparent)]
+pub struct Ptr<'a, #[pointee] T: ?Sized> {
+    data: &'a mut T,
+}
+
+#[pointee]
+fn f() {}
+
+#[derive(AnotherMacro)]
+#[pointee]
+struct MyStruct;
+
+fn main() {}