]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/macros.rs
Fix static async closure qualifier order
[rust.git] / tests / target / macros.rs
index bc15a86cf349d1c6702fe6b8a3ca1b1261cb1791..e930b5037d930f79873633881acce0468c0f5371 100644 (file)
@@ -11,8 +11,6 @@
 
 itemmacro! {this, is.brace().formatted()}
 
-peg_file! modname("mygrammarfile.rustpeg");
-
 fn main() {
     foo!();
 
@@ -980,14 +978,6 @@ fn foo() {
     );
 }
 
-// #2652
-// Preserve trailing comma inside macro, even if it looks an array.
-macro_rules! bar {
-    ($m:ident) => {
-        $m!([a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z]);
-    };
-}
-
 // #2830
 // Preserve trailing comma-less/ness inside nested macro.
 named!(
@@ -1048,3 +1038,25 @@ fn issue3004() {
     foo!(|_| { () });
     stringify!((foo+));
 }
+
+// #3331
+pub fn fold_abi<V: Fold + ?Sized>(_visitor: &mut V, _i: Abi) -> Abi {
+    Abi {
+        extern_token: Token![extern](tokens_helper(_visitor, &_i.extern_token.span)),
+        name: (_i.name).map(|it| _visitor.fold_lit_str(it)),
+    }
+}
+
+// #3463
+x! {()}
+
+// #3746
+f!(match a {
+    4 => &[
+        (3, false), // Missing
+        (4, true)   // I-frame
+    ][..],
+});
+
+// #3583
+foo!(|x = y|);