]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/macros.rs
Fix static async closure qualifier order
[rust.git] / tests / target / macros.rs
index e16159ced1016c46e9580c677d2cd48af99b0326..e930b5037d930f79873633881acce0468c0f5371 100644 (file)
@@ -9,9 +9,7 @@
         .formatted()
 );
 
-itemmacro!{this, is.bracket().formatted()}
-
-peg_file! modname("mygrammarfile.rustpeg");
+itemmacro! {this, is.brace().formatted()}
 
 fn main() {
     foo!();
@@ -94,7 +92,7 @@ fn main() {
 
     foo(makro!(1, 3));
 
-    hamkaas!{ () };
+    hamkaas! { () };
 
     macrowithbraces! {dont,    format, me}
 
@@ -104,11 +102,11 @@ fn main() {
 
     some_macro![];
 
-    some_macro!{
+    some_macro! {
         // comment
     };
 
-    some_macro!{
+    some_macro! {
         // comment
     };
 
@@ -131,7 +129,8 @@ fn main() {
 }
 
 impl X {
-    empty_invoc!{}
+    empty_invoc! {}
+    empty_invoc! {}
 }
 
 fn issue_1279() {
@@ -949,7 +948,7 @@ macro_rules! m {
     };
 }
 fn foo() {
-    f!{r#"
+    f! {r#"
             test
        "#};
 }
@@ -979,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!(
@@ -1042,3 +1033,30 @@ macro_rules! bar {
     static ROOTED_TRACEABLES: RefCell<RootedTraceableSet> =
         RefCell::new(RootedTraceableSet::new(1234));
 ];
+
+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|);