repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/visual_call.rs
src/tools/rustfmt/tests/source/configs/indent_style/visual_call.rs
// rustfmt-indent_style: Visual // Function call style fn main() { lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/block_struct_lit.rs
src/tools/rustfmt/tests/source/configs/indent_style/block_struct_lit.rs
// rustfmt-indent_style: Block // Struct literal-style fn main() { let lorem = Lorem { ipsum: dolor, sit: amet }; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/block_array.rs
src/tools/rustfmt/tests/source/configs/indent_style/block_array.rs
// rustfmt-indent_style: Block // Array layout fn main() { let lorem = vec!["ipsum","dolor","sit","amet","consectetur","adipiscing","elit"]; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/visual_chain.rs
src/tools/rustfmt/tests/source/configs/indent_style/visual_chain.rs
// rustfmt-indent_style: Visual // Chain indent fn main() { let lorem = ipsum.dolor().sit().amet().consectetur().adipiscing().elite(); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/block_where_pred.rs
src/tools/rustfmt/tests/source/configs/indent_style/block_where_pred.rs
// rustfmt-indent_style: Block // Where predicate indent fn lorem<Ipsum, Dolor, Sit, Amet>() -> T where Ipsum: Eq, Dolor: Eq, Sit: Eq, Amet: Eq { // body }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/visual_where_pred.rs
src/tools/rustfmt/tests/source/configs/indent_style/visual_where_pred.rs
// rustfmt-indent_style: Visual // Where predicate indent fn lorem<Ipsum, Dolor, Sit, Amet>() -> T where Ipsum: Eq, Dolor: Eq, Sit: Eq, Amet: Eq { // body }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/block_call.rs
src/tools/rustfmt/tests/source/configs/indent_style/block_call.rs
// rustfmt-indent_style: Block // Function call style fn main() { lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"); // #1501 let hyper = Arc::new(Client::with_connector(HttpsConnector::new(TlsClient::new()))); // chain let x = yooooooooooooo.fooooooooooooooo.baa...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/block_args.rs
src/tools/rustfmt/tests/source/configs/indent_style/block_args.rs
// rustfmt-indent_style: Block // Function arguments layout fn lorem() {} fn lorem(ipsum: usize) {} fn lorem(ipsum: usize, dolor: usize, sit: usize, amet: usize, consectetur: usize, adipiscing: usize, elit: usize) { // body } // #1441 extern "system" { pub fn GetConsoleHistoryInfo(console_history_info: *mut...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/block_chain.rs
src/tools/rustfmt/tests/source/configs/indent_style/block_chain.rs
// rustfmt-indent_style: Block // Chain indent fn main() { let lorem = ipsum.dolor().sit().amet().consectetur().adipiscing().elite(); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/visual_trailing_comma.rs
src/tools/rustfmt/tests/source/configs/indent_style/visual_trailing_comma.rs
// rustfmt-error_on_line_overflow: false // rustfmt-indent_style: Visual // rustfmt should not add trailing comma when rewriting macro. See #1528. fn a() { panic!("this is a long string that goes past the maximum line length causing rustfmt to insert a comma here:"); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/visual_generics.rs
src/tools/rustfmt/tests/source/configs/indent_style/visual_generics.rs
// rustfmt-indent_style: Visual // Generics indent fn lorem<Ipsum: Eq = usize, Dolor: Eq = usize, Sit: Eq = usize, Amet: Eq = usize, Adipiscing: Eq = usize, Consectetur: Eq = usize, Elit: Eq = usize>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, adipiscing: Adipiscing, consectetur: Consectetur, elit: Elit) -> T { ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/block_trailing_comma_call/one.rs
src/tools/rustfmt/tests/source/configs/indent_style/block_trailing_comma_call/one.rs
// rustfmt-style_edition: 2015 // rustfmt-error_on_line_overflow: false // rustfmt-indent_style: Block // rustfmt should not add trailing comma when rewriting macro. See #1528. fn a() { panic!("this is a long string that goes past the maximum line length causing rustfmt to insert a comma here:"); foo(a, ooopto...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/indent_style/block_trailing_comma_call/two.rs
src/tools/rustfmt/tests/source/configs/indent_style/block_trailing_comma_call/two.rs
// rustfmt-style_edition: 2024 // rustfmt-error_on_line_overflow: false // rustfmt-indent_style: Block // rustfmt should not add trailing comma when rewriting macro. See #1528. fn a() { panic!("this is a long string that goes past the maximum line length causing rustfmt to insert a comma here:"); foo(a, ooopto...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/wrap_comments/false.rs
src/tools/rustfmt/tests/source/configs/wrap_comments/false.rs
// rustfmt-wrap_comments: false // rustfmt-max_width: 50 // rustfmt-error_on_line_overflow: false // Wrap comments fn main() { // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco la...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/wrap_comments/true.rs
src/tools/rustfmt/tests/source/configs/wrap_comments/true.rs
// rustfmt-wrap_comments: true // rustfmt-max_width: 50 // Wrap comments fn main() { // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo conseq...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/condense_wildcard_suffixes/false.rs
src/tools/rustfmt/tests/source/configs/condense_wildcard_suffixes/false.rs
// rustfmt-condense_wildcard_suffixes: false // Condense wildcard suffixes fn main() { let (lorem, ipsum, _, _) = (1, 2, 3, 4); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/condense_wildcard_suffixes/true.rs
src/tools/rustfmt/tests/source/configs/condense_wildcard_suffixes/true.rs
// rustfmt-condense_wildcard_suffixes: true // Condense wildcard suffixes fn main() { let (lorem, ipsum, _, _) = (1, 2, 3, 4); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/enum_discrim_align_threshold/40.rs
src/tools/rustfmt/tests/source/configs/enum_discrim_align_threshold/40.rs
// rustfmt-enum_discrim_align_threshold: 40 enum Standard { A = 1, Bcdef = 2, } enum NoDiscrims { ThisIsAFairlyLongEnumVariantWithoutDiscrimLongerThan40, A = 1, ThisIsAnotherFairlyLongEnumVariantWithoutDiscrimLongerThan40, Bcdef = 2, } enum TooLong { ThisOneHasDiscrimAaaaaaaaaaaaaaaaaaaaa...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/fn_params_layout/compressed.rs
src/tools/rustfmt/tests/source/configs/fn_params_layout/compressed.rs
// rustfmt-fn_params_layout: Compressed // Function arguments density trait Lorem { fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet); fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) { // body } fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsect...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/fn_params_layout/vertical.rs
src/tools/rustfmt/tests/source/configs/fn_params_layout/vertical.rs
// rustfmt-fn_params_layout: Vertical // Function arguments density trait Lorem { fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet); fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) { // body } fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectet...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/fn_params_layout/tall.rs
src/tools/rustfmt/tests/source/configs/fn_params_layout/tall.rs
// rustfmt-fn_params_layout: Tall // Function arguments density trait Lorem { fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet); fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) { // body } fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur, ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/type_punctuation_density/compressed.rs
src/tools/rustfmt/tests/source/configs/type_punctuation_density/compressed.rs
// rustfmt-type_punctuation_density: Compressed // Type punctuation density fn lorem<Ipsum:Dolor+Sit=Amet>() { // body } struct Foo<T: Eq + Clone, U> where U: Eq + Clone { // body } trait Foo<'a, T = usize> where T: 'a + Eq + Clone { type Bar: Eq + Clone; } trait Foo: Eq + Clone { // body } impl<T>...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/type_punctuation_density/wide.rs
src/tools/rustfmt/tests/source/configs/type_punctuation_density/wide.rs
// rustfmt-type_punctuation_density: Wide // Type punctuation density fn lorem<Ipsum:Dolor+Sit=Amet>() { // body } struct Foo<T: Eq + Clone, U> where U: Eq + Clone { // body } trait Foo<'a, T = usize> where T: 'a + Eq + Clone { type Bar: Eq + Clone; } trait Foo: Eq + Clone { // body } impl<T> Foo<'...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/style_edition/overflow_delim_expr_2015.rs
src/tools/rustfmt/tests/source/configs/style_edition/overflow_delim_expr_2015.rs
// rustfmt-style_edition: 2015 fn combine_blocklike() { do_thing( |param| { action(); foo(param) }, ); do_thing( x, |param| { action(); foo(param) }, ); do_thing( x, // I'll be discussing the ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/style_edition/overflow_delim_expr_2024.rs
src/tools/rustfmt/tests/source/configs/style_edition/overflow_delim_expr_2024.rs
// rustfmt-style_edition: 2024 fn combine_blocklike() { do_thing( |param| { action(); foo(param) }, ); do_thing( x, |param| { action(); foo(param) }, ); do_thing( x, // I'll be discussing the ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/merge_derives/true.rs
src/tools/rustfmt/tests/source/configs/merge_derives/true.rs
// rustfmt-merge_derives: true // Merge multiple derives to a single one. #[bar] #[derive(Eq, PartialEq)] #[foo] #[derive(Debug)] #[foobar] #[derive(Copy, Clone)] pub enum Foo {} #[derive(Eq, PartialEq)] #[derive(Debug)] #[foobar] #[derive(Copy, Clone)] pub enum Bar {} #[derive(Eq, PartialEq)] #[derive(Debug)] #[der...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/force_multiline_block/false.rs
src/tools/rustfmt/tests/source/configs/force_multiline_block/false.rs
// rustfmt-force_multiline_blocks: false // Option forces multiline match arm and closure bodies to be wrapped in a block fn main() { match lorem { Lorem::Ipsum => { if ipsum { println!("dolor"); } } Lorem::Dolor => println!("amet"), } } fn main(...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/force_multiline_block/true.rs
src/tools/rustfmt/tests/source/configs/force_multiline_block/true.rs
// rustfmt-force_multiline_blocks: true // Option forces multiline match arm and closure bodies to be wrapped in a block fn main() { match lorem { Lorem::Ipsum => if ipsum { println!("dolor"); }, Lorem::Dolor => println!("amet"), } } fn main() { result.and_then(|maybe_v...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/blank_lines_lower_bound/1.rs
src/tools/rustfmt/tests/source/configs/blank_lines_lower_bound/1.rs
// rustfmt-blank_lines_lower_bound: 1 fn foo() {} fn bar() {} // comment fn foobar() {} fn foo1() {} fn bar1() {} // comment fn foobar1() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/single_line_let_else_max_width/50.rs
src/tools/rustfmt/tests/source/configs/single_line_let_else_max_width/50.rs
// rustfmt-single_line_let_else_max_width: 50 fn main() { let Some(a) = opt else {}; let Some(b) = opt else { return }; let Some(c) = opt else { return }; let Some(c) = opt else { // a comment should always force the block to be multi-lined return }; let Some(c) ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/single_line_let_else_max_width/zero.rs
src/tools/rustfmt/tests/source/configs/single_line_let_else_max_width/zero.rs
// rustfmt-single_line_let_else_max_width: 0 fn main() { let Some(a) = opt else {}; let Some(b) = opt else { return }; let Some(c) = opt else { return }; let Some(c) = opt else { // a comment should always force the block to be multi-lined return }; let Some(c) =...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/single_line_let_else_max_width/100.rs
src/tools/rustfmt/tests/source/configs/single_line_let_else_max_width/100.rs
// rustfmt-single_line_let_else_max_width: 100 fn main() { let Some(a) = opt else {}; let Some(b) = opt else { return }; let Some(c) = opt else { return }; let Some(c) = opt else { // a comment should always force the block to be multi-lined return }; let Some(c)...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/short_array_element_width_threshold/10.rs
src/tools/rustfmt/tests/source/configs/short_array_element_width_threshold/10.rs
// rustfmt-short_array_element_width_threshold: 10 fn main() { pub const FORMAT_TEST: [u64; 5] = [ 0x0000000000000000, 0xaaaaaaaaaaaaaaaa, 0xbbbbbbbbbbbbbbbb, 0xcccccccccccccccc, 0xdddddddddddddddd, ]; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/short_array_element_width_threshold/20.rs
src/tools/rustfmt/tests/source/configs/short_array_element_width_threshold/20.rs
// rustfmt-short_array_element_width_threshold: 20 fn main() { pub const FORMAT_TEST: [u64; 5] = [ 0x0000000000000000, 0xaaaaaaaaaaaaaaaa, 0xbbbbbbbbbbbbbbbb, 0xcccccccccccccccc, 0xdddddddddddddddd, ]; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/short_array_element_width_threshold/greater_than_max_width.rs
src/tools/rustfmt/tests/source/configs/short_array_element_width_threshold/greater_than_max_width.rs
// rustfmt-max_width: 20 // rustfmt-short_array_element_width_threshold: 30 fn main() { pub const FORMAT_TEST: [u64; 5] = [ 0x0000000000000000, 0xaaaaaaaaaaaaaaaa, 0xbbbbbbbbbbbbbbbb, 0xcccccccccccccccc, 0xdddddddddddddddd, ]; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/reorder_impl_items/false.rs
src/tools/rustfmt/tests/source/configs/reorder_impl_items/false.rs
// rustfmt-reorder_impl_items: false struct Dummy; impl Iterator for Dummy { fn next(&mut self) -> Option<Self::Item> { None } type Item = i32; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/reorder_impl_items/true.rs
src/tools/rustfmt/tests/source/configs/reorder_impl_items/true.rs
// rustfmt-reorder_impl_items: true struct Dummy; impl Iterator for Dummy { fn next(&mut self) -> Option<Self::Item> { None } type Item = i32; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/skip_children/true.rs
src/tools/rustfmt/tests/source/configs/skip_children/true.rs
// rustfmt-skip_children: true mod foo ; mod void;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/skip_children/foo/mod.rs
src/tools/rustfmt/tests/source/configs/skip_children/foo/mod.rs
fn skip_formatting_this() { println ! ( "Skip this" ) ; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/use_small_heuristics/default.rs
src/tools/rustfmt/tests/source/configs/use_small_heuristics/default.rs
// rustfmt-use_small_heuristics: Default enum Lorem { Ipsum, Dolor(bool), Sit { amet: Consectetur, adipiscing: Elit, }, } fn main() { lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing"); let lorem = Lorem { ipsum: dolor, sit: amet, ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/use_small_heuristics/max.rs
src/tools/rustfmt/tests/source/configs/use_small_heuristics/max.rs
// rustfmt-use_small_heuristics: Max enum Lorem { Ipsum, Dolor(bool), Sit { amet: Consectetur, adipiscing: Elit, }, } fn main() { lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing"); let lorem = Lorem { ipsum: dolor, sit: amet, }; ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/use_small_heuristics/off.rs
src/tools/rustfmt/tests/source/configs/use_small_heuristics/off.rs
// rustfmt-use_small_heuristics: Off enum Lorem { Ipsum, Dolor(bool), Sit { amet: Consectetur, adipiscing: Elit, }, } fn main() { lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing"); let lorem = Lorem { ipsum: dolor, sit: amet, }; ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/imports_layout/merge_mixed.rs
src/tools/rustfmt/tests/source/configs/imports_layout/merge_mixed.rs
// rustfmt-imports_indent: Block // rustfmt-imports_granularity: Crate // rustfmt-imports_layout: Mixed use std::{fmt, io, str}; use std::str::FromStr;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/use_try_shorthand/false.rs
src/tools/rustfmt/tests/source/configs/use_try_shorthand/false.rs
// rustfmt-use_try_shorthand: false // Use try! shorthand fn main() { let lorem = try!(ipsum.map(|dolor| dolor.sit())); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/use_try_shorthand/true.rs
src/tools/rustfmt/tests/source/configs/use_try_shorthand/true.rs
// rustfmt-use_try_shorthand: true // Use try! shorthand fn main() { let lorem = try!(ipsum.map(|dolor| dolor.sit())); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate-nested.rs
src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate-nested.rs
// rustfmt-group_imports: StdExternalCrate mod test { use crate::foo::bar; use std::path; use crate::foo::bar2; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate.rs
src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate.rs
// rustfmt-group_imports: StdExternalCrate use chrono::Utc; use super::update::convert_publish_payload; use juniper::{FieldError, FieldResult}; use uuid::Uuid; use alloc::alloc::Layout; use std::sync::Arc; use broker::database::PooledConnection; use super::schema::{Context, Payload}; use core::f32; use crate::model...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate-no_reorder.rs
src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate-no_reorder.rs
// rustfmt-group_imports: StdExternalCrate // rustfmt-reorder_imports: false use chrono::Utc; use super::update::convert_publish_payload; use juniper::{FieldError, FieldResult}; use uuid::Uuid; use alloc::alloc::Layout; use std::sync::Arc; use broker::database::PooledConnection; use super::schema::{Context, Payloa...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/One.rs
src/tools/rustfmt/tests/source/configs/group_imports/One.rs
// rustfmt-group_imports: One use chrono::Utc; use super::update::convert_publish_payload; use juniper::{FieldError, FieldResult}; use uuid::Uuid; use alloc::alloc::Layout; use std::sync::Arc; use broker::database::PooledConnection; use super::schema::{Context, Payload}; use core::f32; use crate::models::Event;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/One-nested.rs
src/tools/rustfmt/tests/source/configs/group_imports/One-nested.rs
// rustfmt-group_imports: One mod test { use crate::foo::bar; use std::path; use crate::foo::bar2; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate-non_consecutive.rs
src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate-non_consecutive.rs
// rustfmt-group_imports: StdExternalCrate use chrono::Utc; use super::update::convert_publish_payload; use juniper::{FieldError, FieldResult}; use uuid::Uuid; use alloc::alloc::Layout; extern crate uuid; use std::sync::Arc; use broker::database::PooledConnection; use super::schema::{Context, Payload}; u...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/One-no_reorder.rs
src/tools/rustfmt/tests/source/configs/group_imports/One-no_reorder.rs
// rustfmt-group_imports: One // rustfmt-reorder_imports: false use chrono::Utc; use super::update::convert_publish_payload; use juniper::{FieldError, FieldResult}; use uuid::Uuid; use alloc::alloc::Layout; use std::sync::Arc; use broker::database::PooledConnection; use super::schema::{Context, Payload}; use core::...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/One-merge_imports.rs
src/tools/rustfmt/tests/source/configs/group_imports/One-merge_imports.rs
// rustfmt-group_imports: One // rustfmt-imports_granularity: Crate use chrono::Utc; use super::update::convert_publish_payload; use juniper::{FieldError, FieldResult}; use uuid::Uuid; use alloc::alloc::Layout; use std::sync::Arc; use alloc::vec::Vec; use broker::database::PooledConnection; use super::schema::{Cont...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate-merge_imports.rs
src/tools/rustfmt/tests/source/configs/group_imports/StdExternalCrate-merge_imports.rs
// rustfmt-group_imports: StdExternalCrate // rustfmt-imports_granularity: Crate use chrono::Utc; use super::update::convert_publish_payload; use juniper::{FieldError, FieldResult}; use uuid::Uuid; use alloc::alloc::Layout; use std::sync::Arc; use alloc::vec::Vec; use broker::database::PooledConnection; use super::...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/spaces_around_ranges/false.rs
src/tools/rustfmt/tests/source/configs/spaces_around_ranges/false.rs
// rustfmt-spaces_around_ranges: false // Spaces around ranges fn main() { let lorem = 0 .. 10; let ipsum = 0 ..= 10; match lorem { 1 .. 5 => foo(), _ => bar, } match lorem { 1 ..= 5 => foo(), _ => bar, } match lorem { 1 ... 5 => foo(), _ =...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/spaces_around_ranges/true.rs
src/tools/rustfmt/tests/source/configs/spaces_around_ranges/true.rs
// rustfmt-spaces_around_ranges: true // Spaces around ranges fn main() { let lorem = 0..10; let ipsum = 0..=10; match lorem { 1..5 => foo(), _ => bar, } match lorem { 1..=5 => foo(), _ => bar, } match lorem { 1...5 => foo(), _ => bar, ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/disable_all_formatting/false.rs
src/tools/rustfmt/tests/source/configs/disable_all_formatting/false.rs
// rustfmt-disable_all_formatting: false // Disable all formatting fn main() { if lorem{println!("ipsum!");}else{println!("dolor!");} }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/configs/disable_all_formatting/true.rs
src/tools/rustfmt/tests/source/configs/disable_all_formatting/true.rs
// rustfmt-disable_all_formatting: true // Disable all formatting fn main() { iflorem{println!("ipsum!");}else{println!("dolor!");} }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/long-fn-1/version_two.rs
src/tools/rustfmt/tests/source/long-fn-1/version_two.rs
// rustfmt-style_edition: 2024 // Tests that a function which is almost short enough, but not quite, gets // formatted correctly. impl Foo { fn some_input(&mut self, input: Input, input_path: Option<PathBuf>, ) -> (Input, Option<PathBuf>) {} fn some_inpu(&mut self, input: Input, input_path: Option<PathBuf>) -...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/long-fn-1/version_one.rs
src/tools/rustfmt/tests/source/long-fn-1/version_one.rs
// rustfmt-style_edition: 2015 // Tests that a function which is almost short enough, but not quite, gets // formatted correctly. impl Foo { fn some_input(&mut self, input: Input, input_path: Option<PathBuf>, ) -> (Input, Option<PathBuf>) {} fn some_inpu(&mut self, input: Input, input_path: Option<PathBuf>) -...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/cfg_mod/wasm32.rs
src/tools/rustfmt/tests/source/cfg_mod/wasm32.rs
fn wasm32() -> &str { "wasm32" }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/cfg_mod/bar.rs
src/tools/rustfmt/tests/source/cfg_mod/bar.rs
fn bar( ) -> &str { "bar" }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/cfg_mod/mod.rs
src/tools/rustfmt/tests/source/cfg_mod/mod.rs
#[cfg_attr(feature = "foo", path = "foo.rs")] #[cfg_attr(not(feture = "foo"), path = "bar.rs")] mod sub_mod; #[cfg_attr(target_arch = "wasm32", path = "dir/dir1/dir2/wasm32.rs")] #[cfg_attr(not(target_arch = "wasm32"), path = "dir/dir1/dir3/wasm32.rs")] mod wasm32; #[some_attr(path = "somewhere.rs")] mod other;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/cfg_mod/other.rs
src/tools/rustfmt/tests/source/cfg_mod/other.rs
fn other() -> &str { "other"}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/cfg_mod/foo.rs
src/tools/rustfmt/tests/source/cfg_mod/foo.rs
fn foo( ) -> &str { "foo" }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/cfg_mod/dir/dir1/dir3/wasm32.rs
src/tools/rustfmt/tests/source/cfg_mod/dir/dir1/dir3/wasm32.rs
fn wasm32 () -> &str { "wasm32" }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/cfg_mod/dir/dir1/dir2/wasm32.rs
src/tools/rustfmt/tests/source/cfg_mod/dir/dir1/dir2/wasm32.rs
fn wasm32 () -> &str { "wasm32" }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/postfix-match/pf-match.rs
src/tools/rustfmt/tests/source/postfix-match/pf-match.rs
#![feature(postfix_match)] fn main() { let val = Some(42); val.match { Some(_) => 2, _ => 1 }; Some(2).match { Some(_) => true, None => false }.match { false => "ferris is cute", true => "I turn cats in to petted cats", }.match { _ => ()...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-4615/minimum_example.rs
src/tools/rustfmt/tests/source/issue-4615/minimum_example.rs
info!(//debug "{}: sending function_code={:04x} data={:04x} crc=0x{:04X} data={:02X?}", self.name, function_code, data, crc, output_cmd );
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/arrow_in_comments/arrow_in_single_comment.rs
src/tools/rustfmt/tests/source/arrow_in_comments/arrow_in_single_comment.rs
// rustfmt-style_edition: 2024 fn main() { match a { _ => // comment with => { println!("A") } } }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/arrow_in_comments/multiple_arrows.rs
src/tools/rustfmt/tests/source/arrow_in_comments/multiple_arrows.rs
// rustfmt-style_edition: 2024 fn main() { match a { _ => // comment with => match b { // one goes to => one => { println("1"); } // two goes to => two => { println("2"); } } } }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3585/extern_crate.rs
src/tools/rustfmt/tests/source/issue-3585/extern_crate.rs
// rustfmt-inline_attribute_width: 100 #[macro_use] extern crate static_assertions; #[cfg(unix)] extern crate static_assertions; // a comment before the attribute #[macro_use] // some comment after extern crate static_assertions;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3585/reorder_imports_disabled.rs
src/tools/rustfmt/tests/source/issue-3585/reorder_imports_disabled.rs
// rustfmt-inline_attribute_width: 100 // rustfmt-reorder_imports: false #[cfg(unix)] extern crate crateb; #[cfg(unix)] extern crate cratea; #[cfg(unix)] use crateb; #[cfg(unix)] use cratea;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3585/reorder_imports_enabled.rs
src/tools/rustfmt/tests/source/issue-3585/reorder_imports_enabled.rs
// rustfmt-inline_attribute_width: 100 // rustfmt-reorder_imports: true #[cfg(unix)] extern crate crateb; #[cfg(unix)] extern crate cratea; #[cfg(unix)] use crateb; #[cfg(unix)] use cratea;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3585/use.rs
src/tools/rustfmt/tests/source/issue-3585/use.rs
// rustfmt-inline_attribute_width: 100 #[macro_use] use static_assertions; #[cfg(unix)] use static_assertions;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/fn-single-line/version_two.rs
src/tools/rustfmt/tests/source/fn-single-line/version_two.rs
// rustfmt-fn_single_line: true // rustfmt-style_edition: 2024 // Test single-line functions. fn foo_expr() { 1 } fn foo_stmt() { foo(); } fn foo_decl_local() { let z = 5; } fn foo_decl_item(x: &mut i32) { x = 3; } fn empty() { } fn foo_return() -> String { "yay" } fn foo_where...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/fn-single-line/version_one.rs
src/tools/rustfmt/tests/source/fn-single-line/version_one.rs
// rustfmt-fn_single_line: true // rustfmt-style_edition: 2015 // Test single-line functions. fn foo_expr() { 1 } fn foo_stmt() { foo(); } fn foo_decl_local() { let z = 5; } fn foo_decl_item(x: &mut i32) { x = 3; } fn empty() { } fn foo_return() -> String { "yay" } fn foo_where...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-2977/trait.rs
src/tools/rustfmt/tests/source/issue-2977/trait.rs
macro_rules! atomic_bits { // the println macro cannot be rewritten because of the asm macro ($type:ty, $ldrex:expr, $strex:expr) => { trait $type { unsafe fn load_excl(address: usize) -> Self { let raw: $type; asm!($ldrex : "=r"(raw) ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-2977/impl.rs
src/tools/rustfmt/tests/source/issue-2977/impl.rs
macro_rules! atomic_bits { // the println macro cannot be rewritten because of the asm macro ($type:ty, $ldrex:expr, $strex:expr) => { impl AtomicBits for $type { unsafe fn load_excl(address: usize) -> Self { let raw: $type; asm!($ldrex : ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-4656/lib.rs
src/tools/rustfmt/tests/source/issue-4656/lib.rs
extern crate cfg_if; cfg_if::cfg_if! { if #[cfg(target_family = "unix")] { mod format_me_please; } }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-4656/format_me_please.rs
src/tools/rustfmt/tests/source/issue-4656/format_me_please.rs
pub fn hello( ) { }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-4656/lib2.rs
src/tools/rustfmt/tests/source/issue-4656/lib2.rs
its_a_macro! { // Contents }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3278/version_two.rs
src/tools/rustfmt/tests/source/issue-3278/version_two.rs
// rustfmt-style_edition: 2024 pub fn parse_conditional<'a, I: 'a>() -> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a where I: Stream<Item = char>, { }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3278/version_one.rs
src/tools/rustfmt/tests/source/issue-3278/version_one.rs
// rustfmt-style_edition: 2015 pub fn parse_conditional<'a, I: 'a>( ) -> impl Parser<Input = I, Output = Expr, PartialState = ()> + 'a where I: Stream<Item = char>, { }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/comments-in-lists/wrap-comments-not-normalized.rs
src/tools/rustfmt/tests/source/comments-in-lists/wrap-comments-not-normalized.rs
// rustfmt-wrap_comments: true // https://github.com/rust-lang/rustfmt/issues/4909 pub enum E { // Expand as needed, numbers should be ascending according to the stage // through the inclusion pipeline, or according to the descriptions Variant1, // Expand as needed, numbers should be ascending accordin...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/comments-in-lists/wrap-comments-true.rs
src/tools/rustfmt/tests/source/comments-in-lists/wrap-comments-true.rs
// rustfmt-normalize_comments: true // rustfmt-wrap_comments: true // https://github.com/rust-lang/rustfmt/issues/4909 pub enum E { // Expand as needed, numbers should be ascending according to the stage // through the inclusion pipeline, or according to the descriptions Variant1, // Expand as needed, ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3987/format_macro_bodies_true.rs
src/tools/rustfmt/tests/source/issue-3987/format_macro_bodies_true.rs
// rustfmt-format_macro_bodies: true // with comments macro_rules! macros { () => {{ Struct { field: ( 42 + //comment 1 42 //comment 2 ), }; }}; } // without comments macro_rules! macros { () => {{ Struct { ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-4381/style_edition_2015.rs
src/tools/rustfmt/tests/source/issue-4381/style_edition_2015.rs
// rustfmt-style_edition: 2015 use std::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64};
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3494/crlf.rs
src/tools/rustfmt/tests/source/issue-3494/crlf.rs
// rustfmt-file_lines: [{"file":"tests/source/issue-3494/crlf.rs","range":[4,5]}] pub fn main() { let world1 = "world"; println!("Hello, {}!", world1); let world2 = "world"; println!("Hello, {}!", world2); let world3 = "world"; println!("Hello, {}!", world3); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-3494/lf.rs
src/tools/rustfmt/tests/source/issue-3494/lf.rs
// rustfmt-file_lines: [{"file":"tests/source/issue-3494/lf.rs","range":[4,5]}] pub fn main() { let world1 = "world"; println!("Hello, {}!", world1); let world2 = "world"; println!("Hello, {}!", world2); let world3 = "world"; println!("Hello, {}!", world3); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-5655/one.rs
src/tools/rustfmt/tests/source/issue-5655/one.rs
// rustfmt-style_edition: 2015 fn foo<T>(_: T) where T: std::fmt::Debug, T: std::fmt::Display, { }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-5655/two.rs
src/tools/rustfmt/tests/source/issue-5655/two.rs
// rustfmt-style_edition: 2024 fn foo<T>(_: T) where T: std::fmt::Debug, T: std::fmt::Display, { }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-2482/b.rs
src/tools/rustfmt/tests/source/issue-2482/b.rs
pub fn b() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-2482/c.rs
src/tools/rustfmt/tests/source/issue-2482/c.rs
pub fn c() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/issue-2482/a.rs
src/tools/rustfmt/tests/source/issue-2482/a.rs
// rustfmt-reorder_modules: true // Do not reorder inline modules. mod c; mod a { fn a() {} } mod b;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/itemized-blocks/no_wrap.rs
src/tools/rustfmt/tests/source/itemized-blocks/no_wrap.rs
// rustfmt-normalize_comments: true // rustfmt-format_code_in_doc_comments: true //! This is an itemized markdown list (see also issue #3224): //! * Outer //! * Outer //! * Inner //! * Inner with lots of text so that it could be reformatted something something something lots of text so that it could be reformatt...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/itemized-blocks/urls.rs
src/tools/rustfmt/tests/source/itemized-blocks/urls.rs
// rustfmt-wrap_comments: true // rustfmt-max_width: 79 //! CMSIS: Cortex Microcontroller Software Interface Standard //! //! The version 5 of the standard can be found at: //! //! http://arm-software.github.io/CMSIS_5/Core/html/index.html //! //! The API reference of the standard can be found at: //! //! - example --...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/itemized-blocks/rewrite_fail.rs
src/tools/rustfmt/tests/source/itemized-blocks/rewrite_fail.rs
// rustfmt-wrap_comments: true // rustfmt-max_width: 50 // This example shows how to configure fern to output really nicely colored logs // - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa // - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa // - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/itemized-blocks/wrap.rs
src/tools/rustfmt/tests/source/itemized-blocks/wrap.rs
// rustfmt-wrap_comments: true // rustfmt-format_code_in_doc_comments: true // rustfmt-max_width: 50 //! This is an itemized markdown list (see also issue #3224): //! * Outer //! * Outer //! * Inner //! * Inner with lots of text so that it could be reformatted something something something lots of text so that i...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/rustfmt/tests/source/imports/imports.rs
src/tools/rustfmt/tests/source/imports/imports.rs
// rustfmt-normalize_comments: true // Imports. // Long import. use rustc_ast::ast::{ItemForeignMod, ItemImpl, ItemMac, ItemMod, ItemStatic, ItemDefaultImpl}; use exceedingly::looooooooooooooooooooooooooooooooooooooooooooooooooooooooooong::import::path::{ItemA, ItemB}; use exceedingly::loooooooooooooooooooooooooooooo...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false