| /third_party/rust/rust/src/tools/rustfmt/ |
| D | README.md | 1 …rustfmt [: [all …]
|
| D | CHANGELOG.md | 13 [#5690]: (https://github.com/rust-lang/rustfmt/pulls/5690) 14 [#5684]: https://github.com/rust-lang/rustfmt/issues/5684 20 …nts with `wrap_comments = true` rustfmt will no longer wrap markdown tables [#4210](https://github… 21 … that include a numbered list in markdown [#5416](https://github.com/rust-lang/rustfmt/issues/5416) 22 - Properly handle markdown sublists that utilize a `+` [#4041](https://github.com/rust-lang/rustfmt… 23 - rustfmt will no longer use shorthand initialization when rewriting a tuple struct even when `use_… 24 …t MyStruct(u64);`. rustfmt will no longer format `MyStruct { 0: 0 }` as `MyStruct { 0 }` [#5488](h… 25 …rustfmt no longer panics when formatting an empty code block in a doc comment with `format_code_in… 32 …rustfmt no longer incorrectly duplicates the where clause bounds when using const expression in wh… 40 …acros [#5728](https://github.com/rust-lang/rustfmt/issues/5728), [#5729](https://github.com/rust-l… [all …]
|
| D | Contributing.md | 3 There are many ways to contribute to Rustfmt. This document lays out what they 5 contributing or need help with anything, please ask in the WG-Rustfmt channel 14 It would be really useful to have people use rustfmt on their projects and file 25 * makes sure that rustfmt run on every file in `./tests/source/` is equal to its 28 not be changed by rustfmt; 29 * checks that rustfmt's code is not changed by running on itself. This ensures 33 equally named one in `./tests/target/`. If it is only required that rustfmt 40 Without explicit settings, the tests will be run using rustfmt's default 44 `// rustfmt-tab_spaces: 3`. Just remember that the comment is part of the input, 47 Use `// rustfmt-target: filename.rs` for this. You can also specify a custom [all …]
|
| D | Cargo.toml | 3 name = "rustfmt-nightly" 6 repository = "https://github.com/rust-lang/rustfmt" 14 name = "rustfmt" 22 name = "rustfmt-format-diff" 26 name = "git-rustfmt" 27 path = "src/git-rustfmt/main.rs" 30 default = ["cargo-fmt", "rustfmt-format-diff"] 32 rustfmt-format-diff = [] 59 rustfmt-config_proc_macro = { version = "0.3", path = "config_proc_macro" }
|
| D | intellij.md | 1 # Running Rustfmt from IntelliJ or CLion 18 ### Run Rustfmt on save 20 - Open Rustfmt settings (File → Settings → Languages & Frameworks → Rust → Rustfmt) and enable "Run… 23 - IntellJ uses autosave, so now your files will always be formatted according to rustfmt. Alternati… 25 ### Bind shortcut to "Reformat File with Rustfmt" action 29 - Right-click on "Reformat File with Rustfmt" and assign a keyboard shortcut 35 - Done. You can now use rustfmt in an opened *.rs file with your previously specified shortcut
|
| D | atom.md | 1 # Running Rustfmt from Atom 5 Rustfmt can be utilized from [rust-analyzer](https://rust-analyzer.github.io/) which is provided by… 18 - Install rustfmt as per the [readme](README.md). 23 - Set rustfmt as the beautifier 25 …*Language Config - Rust - Default Beautifier* and make sure it is set to rustfmt as shown below. Y… 28 - Set the path to your rustfmt location 30 …labeled *Rust - Rustfmt Path*. This setting is towards the bottom and you will need to scroll a bi…
|
| D | bootstrap.sh | 5 # We deliberately avoid reformatting files with rustfmt comment directives. 9 target/release/rustfmt src/lib.rs 10 target/release/rustfmt src/bin/main.rs 11 target/release/rustfmt src/cargo-fmt/main.rs 14 if ! grep -q "rustfmt-" "$filename"; then 15 target/release/rustfmt $filename
|
| /third_party/rust/rust/tests/ui/tool-attributes/ |
| D | tool-attributes-misplaced-1.rs | 1 type A = rustfmt; //~ ERROR expected type, found tool module `rustfmt` 2 type B = rustfmt::skip; //~ ERROR expected type, found tool attribute `rustfmt::skip` 4 #[derive(rustfmt)] //~ ERROR cannot find derive macro `rustfmt` in this scope 5 //~| ERROR cannot find derive macro `rustfmt` in this scope 9 #[rustfmt] //~ ERROR cannot find attribute `rustfmt` in this scope 12 #[rustfmt::skip] // OK 14 rustfmt; //~ ERROR expected value, found tool module `rustfmt` in main() 15 rustfmt!(); //~ ERROR cannot find macro `rustfmt` in this scope in main() 17 rustfmt::skip; //~ ERROR expected value, found tool attribute `rustfmt::skip` in main()
|
| D | tool-attributes-misplaced-1.stderr | 1 error: cannot find derive macro `rustfmt` in this scope 4 LL | #[derive(rustfmt)] 7 error: cannot find derive macro `rustfmt` in this scope 10 LL | #[derive(rustfmt)] 13 error: cannot find attribute `rustfmt` in this scope 16 LL | #[rustfmt] 19 error: cannot find macro `rustfmt` in this scope 22 LL | rustfmt!(); 25 error[E0573]: expected type, found tool module `rustfmt` 28 LL | type A = rustfmt; [all …]
|
| D | tool-attributes-misplaced-2.stderr | 1 error: expected derive macro, found tool attribute `rustfmt::skip` 4 LL | #[derive(rustfmt::skip)] 10 LL | #[derive(rustfmt::skip)] 13 `#[rustfmt::skip]` 15 error: expected macro, found tool attribute `rustfmt::skip` 18 LL | rustfmt::skip!();
|
| /third_party/rust/rust/src/tools/rustfmt/tests/target/ |
| D | skip.rs | 3 #[rustfmt::skip] 7 #[rustfmt::skip] 15 #[cfg_attr(rustfmt, rustfmt::skip)] 21 #[cfg_attr(rustfmt, rustfmt::skip)] in issue1346() 35 #[rustfmt::skip] in skip_on_statements() 43 #![rustfmt::skip] in skip_on_statements() 49 #[cfg_attr(rustfmt, rustfmt::skip)] in skip_on_statements() 57 #[cfg_attr(rustfmt, rustfmt::skip)] in skip_on_statements() 61 #[cfg_attr(rustfmt, rustfmt::skip)] in skip_on_statements() 65 #[cfg_attr(rustfmt, rustfmt::skip)] in skip_on_statements() [all …]
|
| D | issue-3304.rs | 1 // rustfmt-error_on_line_overflow: true 3 #[rustfmt::skip] use one::two::three::four::five::six::seven::eight::night::ten::eleven::twelve::th… 4 #[rustfmt::skip] 19 …#[rustfmt::skip] test_macro! { one, two, three, four, five, six, seven, eight, night, ten, eleven,… in main() 20 #[rustfmt::skip] in main() 26 …#[rustfmt::skip] let x = test_macro! { one, two, three, four, five, six, seven, eight, night, ten,… in test_local() 27 #[rustfmt::skip] in test_local() 33 …#[rustfmt::skip] test_expr([9999999999999, 9999999999999, 9999999999999, 9999999999999, 9999999999… in test_expr() 34 #[rustfmt::skip] in test_expr() 39 #[rustfmt::skip] mod test { use one::two::three::four::five::six::seven::eight::night::ten::eleven:… [all …]
|
| D | issue_4049.rs | 1 // rustfmt-max_width: 110 2 // rustfmt-use_small_heuristics: Max 3 // rustfmt-hard_tabs: true 4 // rustfmt-use_field_init_shorthand: true 5 // rustfmt-overflow_delimited_expr: true 7 // https://github.com/rust-lang/rustfmt/issues/4049
|
| /third_party/rust/rust/src/tools/rustfmt/tests/target/issue-4791/ |
| D | issue_4928.rs | 1 // rustfmt-brace_style: SameLineWhere 2 // rustfmt-comment_width: 100 3 // rustfmt-edition: 2018 4 // rustfmt-fn_params_layout: Compressed 5 // rustfmt-hard_tabs: false 6 // rustfmt-match_block_trailing_comma: true 7 // rustfmt-max_width: 100 8 // rustfmt-merge_derives: false 9 // rustfmt-newline_style: Unix 10 // rustfmt-normalize_doc_attributes: true [all …]
|
| /third_party/rust/crates/bindgen/book/src/ |
| D | code-formatting.md | 3 `bindgen` uses `rustfmt` to format the emitted bindings. This section describes 4 how to adjust the `rustfmt` behavior when being used from `bindgen`. 6 ## Passing a `rustfmt.toml` configuration file 8 `rustfmt` should automatically use any `rustfmt.toml` file that is present in 11 directory you can use the `--rustfmt-configuration-file` flag or the 15 ## Using a nightly release of `rustfmt` 17 If the `rustfmt` command does not correspond to a nightly release of `rustfmt` 33 $ rustup which rustfmt --toolchain=nightly 44 .args(["which", "rustfmt", "--toolchain", "nightly"]) 55 String::from_utf8(output.stdout).expect("The `rustfmt` path is not valid `utf-8`"); [all …]
|
| /third_party/rust/rust/library/portable-simd/crates/core_simd/src/simd/ |
| D | prelude.rs | 14 #[rustfmt::skip] 18 #[rustfmt::skip] 22 #[rustfmt::skip] 26 #[rustfmt::skip] 30 #[rustfmt::skip] 34 #[rustfmt::skip] 38 #[rustfmt::skip] 42 #[rustfmt::skip] 46 #[rustfmt::skip] 50 #[rustfmt::skip] [all …]
|
| /third_party/rust/crates/syn/tests/repo/ |
| D | mod.rs | 18 #[rustfmt::skip] 32 "src/tools/rustfmt/tests/source/issue_5721.rs", 33 "src/tools/rustfmt/tests/source/non-lifetime-binders.rs", 34 "src/tools/rustfmt/tests/target/issue_5721.rs", 35 "src/tools/rustfmt/tests/target/non-lifetime-binders.rs", 71 "src/tools/rustfmt/tests/target/negative-bounds.rs", 80 "src/tools/rustfmt/tests/source/trait.rs", 81 "src/tools/rustfmt/tests/target/trait.rs", 88 "src/tools/rustfmt/tests/source/issue_4257.rs", 89 "src/tools/rustfmt/tests/source/issue_4911.rs", [all …]
|
| /third_party/rust/rust/src/tools/rustfmt/ci/ |
| D | check_diff.sh | 40 # $1: Path to a rustfmt binary 42 # $3: Any additional configuration options to pass to rustfmt 60 # Run the master rustfmt binary and the feature branch binary in the current directory and compare … 66 # $RUSFMT_BIN: Path to the rustfmt master binary. Created when running `compile_rustfmt` 67 # $FEATURE_BIN: Path to the rustfmt feature binary. Created when running `compile_rustfmt` 70 echo "running rustfmt (master) on $1" 73 echo "running rustfmt (feature) on $1" 78 # we don't add color to the diff since we added color when running rustfmt --check. 81 # Again, the diff output we care about was already added when we ran rustfmt --check 88 echo "no diff detected between rustfmt and the feture branch" [all …]
|
| /third_party/rust/rust/src/tools/clippy/tests/ui/ |
| D | cfg_attr_rustfmt.stderr | 1 error: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes 4 LL | #[cfg_attr(rustfmt, rustfmt::skip)] 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` 9 error: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes 12 LL | #[cfg_attr(rustfmt, rustfmt_skip)] 13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]` 15 error: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes 18 LL | #[cfg_attr(rustfmt, rustfmt::skip)] 19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
| D | cfg_attr_rustfmt.rs | 8 #![cfg_attr(rustfmt, rustfmt_skip)] 10 #[rustfmt::skip] 18 #[cfg_attr(rustfmt, rustfmt::skip)] in skip_on_statements() 22 #[cfg_attr(rustfmt, rustfmt_skip)] 28 #![cfg_attr(rustfmt, rustfmt_skip)] 35 #[cfg_attr(rustfmt, rustfmt::skip)] in msrv_1_29() 41 #[cfg_attr(rustfmt, rustfmt::skip)] in msrv_1_30()
|
| D | cfg_attr_rustfmt.fixed | 8 #![cfg_attr(rustfmt, rustfmt_skip)] 10 #[rustfmt::skip] 18 #[rustfmt::skip] 22 #[rustfmt::skip] 28 #![cfg_attr(rustfmt, rustfmt_skip)] 35 #[cfg_attr(rustfmt, rustfmt::skip)] 41 #[rustfmt::skip]
|
| D | endian_bytes.rs | 81 #[rustfmt::skip] 85 #[rustfmt::skip] 89 #[rustfmt::skip] 93 #[rustfmt::skip] 98 #[rustfmt::skip] 103 #[rustfmt::skip] 109 #[rustfmt::skip] 114 #[rustfmt::skip] 119 #[rustfmt::skip] 124 #[rustfmt::skip]
|
| /third_party/rust/rust/src/tools/rustfmt/config_proc_macro/src/ |
| D | utils.rs | 22 #[cfg(feature = "debug-with-rustfmt")] 23 /// Pretty-print the output of proc macro using rustfmt. 30 let rustfmt_var = env::var_os("RUSTFMT"); in debug_with_rustfmt() 31 let rustfmt = match &rustfmt_var { in debug_with_rustfmt() localVariable 32 Some(rustfmt) => rustfmt, in debug_with_rustfmt() 33 None => OsStr::new("rustfmt"), in debug_with_rustfmt() 35 let mut child = Command::new(rustfmt) in debug_with_rustfmt() 39 .expect("Failed to spawn rustfmt in stdio mode"); in debug_with_rustfmt() 46 let rustfmt_output = child.wait_with_output().expect("rustfmt has failed"); in debug_with_rustfmt() 50 String::from_utf8(rustfmt_output.stdout).expect("rustfmt returned non-UTF8 string") in debug_with_rustfmt()
|
| /third_party/rust/rust/src/tools/rustfmt/tests/rustfmt/ |
| D | main.rs | 1 //! Integration tests for rustfmt. 10 /// Run the rustfmt executable and return its output. 11 fn rustfmt(args: &[&str]) -> (String, String) { in rustfmt() function 17 let cmd = bin_dir.join(format!("rustfmt{}", env::consts::EXE_SUFFIX)); in rustfmt() 19 // Ensure the rustfmt binary runs from the local target dir. in rustfmt() 36 let (stdout, stderr) = rustfmt($args); 39 "Output not expected for rustfmt {:?}\n\ 66 let (stdout, stderr) = rustfmt(&[ in print_config() 115 let (stdout, _) = rustfmt(&args); in rustfmt_usage_text() 116 assert!(stdout.contains("Format Rust code\n\nusage: rustfmt [options] <file>...")); in rustfmt_usage_text() [all …]
|
| /third_party/rust/rust/tests/ui/proc-macro/ |
| D | inert-attribute-order.stdout | 2 #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"] #[rustfmt :: attr5] /// 6 4 PRINT-ATTR RE-COLLECTED (DISPLAY): #[doc = " 1"] #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"] 5 #[rustfmt :: attr5] #[doc = " 6"] #[print_attr(nodebug)] struct S ; 6 PRINT-ATTR INPUT (DISPLAY): #[doc = " 1"] #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"] 7 #[rustfmt :: attr5] #[doc = " 6"] struct S ;
|