]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/typeck-macro-interaction-issue-8852.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / typeck-macro-interaction-issue-8852.rs
index 48d073e28aa753092fc0fd98b9323082e76474d9..673e852356266bafc5c35152453260d889201923 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(macro_rules)]
-
 enum T {
     A(int),
     B(f64)
@@ -20,20 +18,20 @@ enum T {
 // doesn't cause capture. Making this macro hygienic (as I've done)
 // could very well make this test case completely pointless....
 
-macro_rules! test(
+macro_rules! test {
     ($id1:ident, $id2:ident, $e:expr) => (
         fn foo(a:T, b:T) -> T {
             match (a, b) {
-                (A($id1), A($id2)) => A($e),
-                (B($id1), B($id2)) => B($e),
+                (T::A($id1), T::A($id2)) => T::A($e),
+                (T::B($id1), T::B($id2)) => T::B($e),
                 _ => panic!()
             }
         }
     )
-)
+}
 
-test!(x,y,x + y)
+test!(x,y,x + y);
 
 pub fn main() {
-    foo(A(1), A(2));
+    foo(T::A(1), T::A(2));
 }