about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-11-07 22:47:14 +0000
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-11-10 11:19:38 +0000
commitf35eff2c57ccbeab2b4775dddbebc9bdc8e0e785 (patch)
treef6101ef6891953cd1bd343d4b3c796ae9a243b4e /src
parent0a998b86e977912dfabd4fddb3c7efe87accf2c2 (diff)
downloadrust-f35eff2c57ccbeab2b4775dddbebc9bdc8e0e785.tar.gz
rust-f35eff2c57ccbeab2b4775dddbebc9bdc8e0e785.zip
Test `#[macro_reexport]`ing custom derives.
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-reexport.rs16
-rw-r--r--src/test/run-pass-fulldeps/proc-macro/use-reexport.rs22
2 files changed, 38 insertions, 0 deletions
diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-reexport.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-reexport.rs
new file mode 100644
index 00000000000..05a6cbec69c
--- /dev/null
+++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-reexport.rs
@@ -0,0 +1,16 @@
+// Copyright 2016 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.
+
+// ignore-test
+
+#![feature(macro_reexport, proc_macro)]
+
+#[macro_reexport(A)]
+extern crate derive_a;
diff --git a/src/test/run-pass-fulldeps/proc-macro/use-reexport.rs b/src/test/run-pass-fulldeps/proc-macro/use-reexport.rs
new file mode 100644
index 00000000000..7f09d8faebb
--- /dev/null
+++ b/src/test/run-pass-fulldeps/proc-macro/use-reexport.rs
@@ -0,0 +1,22 @@
+// Copyright 2016 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:derive-a.rs
+// aux-build:derive-reexport.rs
+
+#![feature(proc_macro)]
+
+#[macro_use]
+extern crate derive_reexport;
+
+#[derive(Debug, PartialEq, A, Eq, Copy, Clone)]
+struct A;
+
+fn main() {}