diff options
| author | Corey Richardson <corey@octayn.net> | 2013-11-16 01:34:52 -0500 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2013-11-17 18:35:47 -0500 |
| commit | 5d466ff96ece2e050424a11771ce003488dc2d24 (patch) | |
| tree | b0d8029b445c6f4d955c8dc41de6e5fe7cad2717 /src | |
| parent | e0943504e4d4c42342cb7c0fa24895f991b01ca8 (diff) | |
| download | rust-5d466ff96ece2e050424a11771ce003488dc2d24.tar.gz rust-5d466ff96ece2e050424a11771ce003488dc2d24.zip | |
Add a test for #6976
Closes #6976
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-pass/deriving-in-macro.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/run-pass/deriving-in-macro.rs b/src/test/run-pass/deriving-in-macro.rs new file mode 100644 index 00000000000..71b5f269e34 --- /dev/null +++ b/src/test/run-pass/deriving-in-macro.rs @@ -0,0 +1,24 @@ +// Copyright 2012 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. + +#[feature(macro_rules)]; + +macro_rules! define_vec ( + () => ( + mod foo { + #[deriving(Eq)] + pub struct bar; + } + ) +) + +define_vec!() + +pub fn main() {} |
