1 // rustfmt-normalize_comments: true
2 itemmacro!(this, is.now().formatted(yay));
6 long.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb()
11 itemmacro!{this, is.bracket().formatted()}
13 peg_file! modname("mygrammarfile.rustpeg");
22 baz!(1 + 2 + 3, quux.kaas());
25 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
26 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
35 trailingcomma!(a, b, c,);
36 // Preserve trailing comma only when necessary.
37 ok!(file.seek(SeekFrom::Start(
38 table.map(|table| fixture.offset(table)).unwrap_or(0),
41 noexpr!( i am not an expression, OK? );
64 vec![a /* comment */];
66 // Trailing spaces after a comma
86 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
88 vec![a; unsafe { x + 1 }];
90 unknown_bracket_macro__comma_should_not_be_stripped![a,];
96 macrowithbraces! {dont, format, me}
118 let image = gray_image!(
124 chain!(input, a: take!(max_size), || []);
132 println!("dsfs"); // a comment
136 let hello = &format!(
137 "HTTP/1.1 200 OK\r\nServer: {}\r\n\r\n{}",
138 "65454654654654654654654655464", "4"
144 (#[$attr:meta] $name:ident) => {}
159 b: types::Timestamptz,
168 init_size[1] - extreeeeeeeeeeeeeeeeeeeeeeeem..init_size[1],
170 ]).par_map_inplace(|el| *el = 0.);
181 .collect::<Vec<_>>();
187 fn test(a: String, s: String, b: String) -> TestResult {
188 if a.find(&s).is_none() {
190 TestResult::from_bool(true)
192 TestResult::discard()
202 static ref ONE: u32 = 1;
203 static ref TWO: u32 = 2;
204 static ref THREE: u32 = 3;
205 static ref FOUR: u32 = {
222 vbuf: gfx::VertexBuffer<Vertex> = (),
223 out: gfx::RenderTarget<ColorFormat> = "Target0",
228 fn __bindgen_test_layout_HandleWithDtor_open0_int_close0_instantiation() {
230 ::std::mem::size_of::<HandleWithDtor<::std::os::raw::c_int>>(),
233 "Size of template specialization: ",
234 stringify!(HandleWithDtor<::std::os::raw::c_int>)
238 ::std::mem::align_of::<HandleWithDtor<::std::os::raw::c_int>>(),
241 "Alignment of template specialization: ",
242 stringify!(HandleWithDtor<::std::os::raw::c_int>)
248 macro_rules! try_opt {
249 ($expr:expr) => (match $expr {
252 None => { return None; }
257 // macro call whose argument is an array with trailing comma.
260 str_searcher_ascii_haystack,
273 fn special_case_macros() {
274 let q = eprint!("{}", 1);
276 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
277 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
280 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
309 let q = eprintln!("{}", 1);
311 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
312 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
315 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
344 let q = format!("{}", 1);
346 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
347 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
350 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
379 let q = format_args!("{}", 1);
380 let r = format_args!(
381 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
382 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
384 let s = format_args!(
385 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
414 let q = print!("{}", 1);
416 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
417 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
420 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
449 let q = println!("{}", 1);
451 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
452 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
455 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
484 let q = unreachable!("{}", 1);
485 let r = unreachable!(
486 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
487 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
489 let s = unreachable!(
490 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
521 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
522 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
525 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
556 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
557 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
560 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
591 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
592 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
595 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
626 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
627 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
630 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
661 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
662 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
665 "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
697 "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')",
698 result, input, expected
705 pub fn foo(&self) -> Bar<foo!()> {}