]> git.lizzy.rs Git - rust.git/blobdiff - tests/source/macros.rs
Implement 'vec![expr; expr]'
[rust.git] / tests / source / macros.rs
index 261f02e756f57540b74983953fba5c81b0997faf..afaf67359ed375b910c5965f00d1a6c96f46cc94 100644 (file)
@@ -1,9 +1,12 @@
+// rustfmt-normalize_comments: true
 itemmacro!(this, is.now() .formatted(yay));
 
 itemmacro!(really, long.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb() .is.formatted());
 
 itemmacro!{this, is.bracket().formatted()}
 
+peg_file!   modname  ("mygrammarfile.rustpeg");
+
 fn main() {
     foo! ( );
 
@@ -26,6 +29,22 @@ fn main() {
 
     vec! [a /* comment */];
 
+    // Trailing spaces after a comma
+    vec![
+    a,   
+    ];
+    
+    vec![a; b];
+    vec!(a; b);
+    vec!{a; b};
+
+    vec![a, b; c];
+    vec![a; b, c];
+
+    unknown_bracket_macro__comma_should_not_be_stripped![
+    a,
+    ];
+    
     foo(makro!(1,   3));
 
     hamkaas!{ () };
@@ -33,4 +52,43 @@ fn main() {
     macrowithbraces! {dont,    format, me}
 
     x!(fn);
+
+    some_macro!(
+        
+    );
+
+    some_macro![
+    ];
+
+    some_macro!{
+        // comment
+    };
+
+    some_macro!{
+        // comment
+    };
+
+    some_macro!(
+        // comment
+        not function like
+    );
+}
+
+impl X {
+    empty_invoc!{}
+}
+
+gfx_pipeline!(pipe {
+    vbuf: gfx::VertexBuffer<Vertex> = (),
+    out: gfx::RenderTarget<ColorFormat> = "Target0",
+});
+
+fn issue_1279() {
+    println!("dsfs"); // a comment
+}
+
+fn issue_1555() {
+    let hello = &format!("HTTP/1.1 200 OK\r\nServer: {}\r\n\r\n{}",
+                         "65454654654654654654654655464",
+                         "4");
 }