1 // rustfmt-normalize_comments: true
2 itemmacro!(this, is.now() .formatted(yay));
4 itemmacro!(really, long.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb() .is.formatted());
6 itemmacro!{this, is.bracket().formatted()}
8 peg_file! modname ("mygrammarfile.rustpeg");
17 baz!(1+2+3, quux. kaas());
19 quux!(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB);
21 kaas!(/* comments */ a /* post macro */, b /* another */);
23 trailingcomma!( a , b , c , );
25 noexpr!( i am not an expression, OK? );
29 vec! [AAAAAA, AAAAAA, AAAAAA, AAAAAA, AAAAAA, AAAAAA, AAAAAA, AAAAAA, AAAAAA,
30 BBBBB, 5, 100-30, 1.33, b, b, b];
32 vec! [a /* comment */];
34 // Trailing spaces after a comma
46 vec![a; (|x| { let y = x + 1; let z = y + 1; z })(2)];
47 vec![a; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx];
52 unknown_bracket_macro__comma_should_not_be_stripped![
60 macrowithbraces! {dont, format, me}
85 let image = gray_image!(
91 chain!(input, a:take!(max_size), || []);
99 println!("dsfs"); // a comment
103 let hello = &format!("HTTP/1.1 200 OK\r\nServer: {}\r\n\r\n{}",
104 "65454654654654654654654655464",
110 (#[$attr:meta] $name:ident) => {}
113 foo!(#[doc = "bar"] baz);
117 sql_function!(add_rss_item,
120 b: types::Timestamptz,
125 w.slice_mut(s![.., init_size[1] - extreeeeeeeeeeeeeeeeeeeeeeeem..init_size[1], ..])
126 .par_map_inplace(|el| *el = 0.);
130 let threads = people.into_iter().map(|name| {
134 }).collect::<Vec<_>>();
140 fn test(a: String, s: String, b: String) -> TestResult {
141 if a.find(&s).is_none() {
143 TestResult::from_bool(true)
145 TestResult::discard()
155 static ref ONE: u32 = 1;
156 static ref TWO: u32 = 2;
157 static ref THREE: u32 = 3;
158 static ref FOUR: u32 = {
167 // Put the following tests with macro invocations whose arguments cannot be parsed as expressioins
168 // at the end of the file for now.
178 vbuf: gfx::VertexBuffer<Vertex> = (),
179 out: gfx::RenderTarget<ColorFormat> = "Target0",