| /third_party/rust/rust/src/tools/clippy/tests/ui/ |
| D | cfg_attr_rustfmt.rs | 1 //@run-rustfix 4 #![allow(unused, clippy::no_effect, clippy::unnecessary_operation)] 5 #![warn(clippy::deprecated_cfg_attr)] 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)] 33 #[clippy::msrv = "1.29"] 35 #[cfg_attr(rustfmt, rustfmt::skip)] in msrv_1_29() [all …]
|
| D | cfg_attr_rustfmt.fixed | 1 //@run-rustfix 4 #![allow(unused, clippy::no_effect, clippy::unnecessary_operation)] 5 #![warn(clippy::deprecated_cfg_attr)] 8 #![cfg_attr(rustfmt, rustfmt_skip)] 10 #[rustfmt::skip] 18 #[rustfmt::skip] 22 #[rustfmt::skip] 28 #![cfg_attr(rustfmt, rustfmt_skip)] 33 #[clippy::msrv = "1.29"] 35 #[cfg_attr(rustfmt, rustfmt::skip)] [all …]
|
| D | unused_unit.fixed | 1 //@run-rustfix 11 #![rustfmt::skip] 13 #![deny(clippy::unused_unit)] 15 #![allow(clippy::from_over_into)] 19 #[allow(clippy::no_effect)] 28 #[rustfmt::skip] 50 #[allow(clippy::needless_return)] 51 #[allow(clippy::never_loop)] 52 #[allow(clippy::unit_cmp)] 63 // https://github.com/rust-lang/rust-clippy/issues/4076 [all …]
|
| D | unused_unit.rs | 1 //@run-rustfix 11 #![rustfmt::skip] 13 #![deny(clippy::unused_unit)] 15 #![allow(clippy::from_over_into)] 19 #[allow(clippy::no_effect)] 20 pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> () in get_unit() 21 where G: Fn() -> () { in get_unit() 22 let _y: &dyn Fn() -> () = &f; in get_unit() 28 #[rustfmt::skip] 29 fn into(self) -> () { in into() [all …]
|
| D | needless_question_mark.fixed | 1 //@run-rustfix 3 #![warn(clippy::needless_question_mark)] 5 clippy::needless_return, 6 clippy::unnecessary_unwrap, 7 clippy::upper_case_acronyms, 20 fn simple_option_bad1(to: TO) -> Option<usize> { 25 // formatting will add a semi-colon, which would make 27 #[rustfmt::skip] 28 fn simple_option_bad2(to: TO) -> Option<usize> { 33 fn simple_option_bad3(to: TO) -> Option<usize> { [all …]
|
| D | manual_async_fn.fixed | 1 //@run-rustfix 2 #![warn(clippy::manual_async_fn)] 3 #![allow(clippy::needless_pub_self, unused)] 7 async fn fut() -> i32 { 42 } 9 #[rustfmt::skip] 10 async fn fut2() -> i32 { 42 } 12 #[rustfmt::skip] 13 async fn fut3() -> i32 { 42 } 17 #[rustfmt::skip] 20 #[rustfmt::skip] [all …]
|
| D | single_match_else.rs | 1 //@run-rustfix 2 //@aux-build: proc_macros.rs:proc-macro 3 #![warn(clippy::single_match_else)] 4 #![allow(unused, clippy::needless_return, clippy::no_effect, clippy::uninlined_format_args)] 16 fn unwrap_addr() -> Option<&'static ExprNode> { in unwrap_addr() 47 #[rustfmt::skip] 156 #[rustfmt::skip] in issue_10808() 174 #[rustfmt::skip] in issue_10808() 185 #[rustfmt::skip] in issue_10808() 192 #[rustfmt::skip] in issue_10808()
|
| D | needless_question_mark.rs | 1 //@run-rustfix 3 #![warn(clippy::needless_question_mark)] 5 clippy::needless_return, 6 clippy::unnecessary_unwrap, 7 clippy::upper_case_acronyms, 20 fn simple_option_bad1(to: TO) -> Option<usize> { in simple_option_bad1() 25 // formatting will add a semi-colon, which would make 27 #[rustfmt::skip] 28 fn simple_option_bad2(to: TO) -> Option<usize> { in simple_option_bad2() 33 fn simple_option_bad3(to: TO) -> Option<usize> { in simple_option_bad3() [all …]
|
| D | semicolon_if_nothing_returned.rs | 1 #![warn(clippy::semicolon_if_nothing_returned)] 2 #![allow(clippy::redundant_closure, clippy::uninlined_format_args)] 20 #[rustfmt::skip] 27 #[rustfmt::skip] 79 #[rustfmt::skip] 102 #[rustfmt::skip] 113 fn function_returning_option() -> Option<i32> { in function_returning_option()
|
| D | needless_return.fixed | 1 //@run-rustfix 7 clippy::if_same_then_else, 8 clippy::single_match, 9 clippy::needless_bool, 10 clippy::equatable_if_let, 11 clippy::needless_else 13 #![warn(clippy::needless_return)] 23 fn test_end_of_fn() -> bool { 31 fn test_no_semicolon() -> bool { 35 #[rustfmt::skip] [all …]
|
| D | manual_async_fn.rs | 1 //@run-rustfix 2 #![warn(clippy::manual_async_fn)] 3 #![allow(clippy::needless_pub_self, unused)] 7 fn fut() -> impl Future<Output = i32> { in fut() 11 #[rustfmt::skip] 12 fn fut2() ->impl Future<Output = i32> { in fut2() 16 #[rustfmt::skip] 17 fn fut3()-> impl Future<Output = i32> { in fut3() 21 fn empty_fut() -> impl Future<Output = ()> { in empty_fut() 25 #[rustfmt::skip] [all …]
|
| D | single_match_else.fixed | 1 //@run-rustfix 2 //@aux-build: proc_macros.rs:proc-macro 3 #![warn(clippy::single_match_else)] 4 #![allow(unused, clippy::needless_return, clippy::no_effect, clippy::uninlined_format_args)] 16 fn unwrap_addr() -> Option<&'static ExprNode> { 44 #[rustfmt::skip] 146 #[rustfmt::skip] 157 #[rustfmt::skip] 164 #[rustfmt::skip]
|
| D | implicit_return.fixed | 1 //@run-rustfix 3 #![warn(clippy::implicit_return)] 4 #![allow(clippy::needless_return, clippy::needless_bool, unused, clippy::never_loop)] 6 fn test_end_of_fn() -> bool { 15 fn test_if_block() -> bool { 19 #[rustfmt::skip] 20 fn test_match(x: bool) -> bool { 27 fn test_match_with_unreachable(x: bool) -> bool { 34 fn test_loop() -> bool { 40 fn test_loop_with_block() -> bool { [all …]
|
| D | implicit_return.rs | 1 //@run-rustfix 3 #![warn(clippy::implicit_return)] 4 #![allow(clippy::needless_return, clippy::needless_bool, unused, clippy::never_loop)] 6 fn test_end_of_fn() -> bool { in test_end_of_fn() 15 fn test_if_block() -> bool { in test_if_block() 19 #[rustfmt::skip] 20 fn test_match(x: bool) -> bool { in test_match() 27 fn test_match_with_unreachable(x: bool) -> bool { in test_match_with_unreachable() 34 fn test_loop() -> bool { in test_loop() 40 fn test_loop_with_block() -> bool { in test_loop_with_block() [all …]
|
| D | needless_return.rs | 1 //@run-rustfix 7 clippy::if_same_then_else, 8 clippy::single_match, 9 clippy::needless_bool, 10 clippy::equatable_if_let, 11 clippy::needless_else 13 #![warn(clippy::needless_return)] 23 fn test_end_of_fn() -> bool { in test_end_of_fn() 31 fn test_no_semicolon() -> bool { in test_no_semicolon() 35 #[rustfmt::skip] [all …]
|
| /third_party/rust/crates/env_logger/.github/workflows/ |
| D | ci.yml | 10 - main 22 needs: [test, msrv, docs, rustfmt, clippy] 23 runs-on: ubuntu-latest 25 - name: Done 31 os: ["ubuntu-latest", "windows-latest", "macos-latest"] 33 continue-on-error: ${{ matrix.rust != 'stable' }} 34 runs-on: ${{ matrix.os }} 36 - name: Checkout repository 38 - name: Install Rust 39 uses: dtolnay/rust-toolchain@stable [all …]
|
| /third_party/rust/crates/which-rs/.github/workflows/ |
| D | rust.yml | 7 # Run the `rustfmt` code formatter 8 rustfmt: 9 name: Rustfmt [Formatter] 10 runs-on: ubuntu-latest 12 - name: Setup | Checkout 15 - name: Setup | Rust 16 uses: actions-rs/toolchain@v1 21 components: rustfmt 23 - name: Build | Format 24 run: cargo fmt --all -- --check [all …]
|
| /third_party/rust/crates/either/.github/workflows/ |
| D | ci.yml | 11 runs-on: ubuntu-latest 13 fail-fast: false 16 - 1.36.0 # MSRV 17 - stable 18 - beta 19 - nightly 21 - "" 22 - "serde" 25 - name: Checkout 28 - name: Set up Rust [all …]
|
| /third_party/rust/crates/minimal-lexical/docs/ |
| D | Development.md | 13 … made **public** to separate the tests from the implementation, although non-documented members is… 24 - Clippy 25 - Rustfmt 26 - Miri 27 - Valgrind 28 - Tarpaulin 29 - Fuzz 30 - Count 36 rustup +nightly component add clippy 37 rustup +nightly component add rustfmt [all …]
|
| /third_party/rust/crates/clap/.github/workflows/ |
| D | rust-next.yml | 1 name: rust-next 4 - cron: '3 3 3 * *' 15 - build: stable 16 os: ubuntu-latest 19 - build: linux 20 os: ubuntu-latest 23 - build: windows 24 os: windows-latest 27 - build: mac 28 os: macos-latest [all …]
|
| D | ci.yml | 7 - cron: '3 3 3 * *' 16 needs: [test, check, docs, rustfmt, clippy, cffconvert] 17 runs-on: ubuntu-latest 19 - name: Done 27 - build: linux 28 os: ubuntu-latest 31 - build: windows 32 os: windows-latest 35 - build: mac 36 os: macos-latest [all …]
|
| /third_party/rust/rust/tests/rustdoc-ui/intra-doc/ |
| D | issue-111189-resolution-ice.stderr | 1 error: unresolved link to `rustfmt::skip` 2 --> $DIR/issue-111189-resolution-ice.rs:6:7 4 LL | /// #[rustfmt::skip] 5 | ^^^^^^^^^^^^^ no item named `rustfmt` in scope 8 --> $DIR/issue-111189-resolution-ice.rs:4:9 14 error: unresolved link to `clippy::whatever` 15 --> $DIR/issue-111189-resolution-ice.rs:8:7 17 LL | /// #[clippy::whatever] 18 | ^^^^^^^^^^^^^^^^ no item named `clippy` in scope
|
| /third_party/rust/crates/syn/tests/repo/ |
| D | mod.rs | 1 #![allow(clippy::manual_assert)] 18 #[rustfmt::skip] 22 "src/tools/clippy/tests/ui/needless_raw_string.rs", 23 "src/tools/clippy/tests/ui/needless_raw_string_hashes.rs", 24 "src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0085_expr_literals.rs", 28 "tests/ui/explicit-tail-calls/return-lifetime-sub.rs", 30 // TODO: non-lifetime binders: `where for<'a, T> &'a Struct<T>: Trait` 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", [all …]
|
| /third_party/rust/rust/src/tools/clippy/book/src/development/ |
| D | adding_lints.md | 3 You are probably here because you want to add a new lint to Clippy. If this is 4 the first time you're contributing to Clippy, this document guides you through 8 because that's clearly a non-descriptive name. 10 - [Adding a new lint](#adding-a-new-lint) 11 - [Setup](#setup) 12 - [Getting Started](#getting-started) 13 - [Defining Our Lint](#defining-our-lint) 14 - [Standalone](#standalone) 15 - [Specific Type](#specific-type) 16 - [Tests Location](#tests-location) [all …]
|
| /third_party/rust/rust/src/tools/clippy/clippy_dev/src/ |
| D | fmt.rs | 20 fn from(error: io::Error) -> Self { in from() 26 fn from(error: walkdir::Error) -> Self { in from() 38 #[allow(clippy::missing_panics_doc)] 40 fn try_run(context: &FmtContext) -> Result<bool, CliError> { in run() 45 …// if we added a local rustc repo as path dependency to clippy for rust analyzer, we do NOT want to in run() 46 // format because rustfmt would also format the entire rustc repo as it is a local in run() 49 .expect("Failed to read clippy Cargo.toml") in run() 68 if path.extension() != Some("rs".as_ref()) || entry.file_name() == "ice-3891.rs" { in run() 77 success &= rustfmt(context, chunk)?; in run() 92 eprintln!("error: rustfmt nightly is not installed."); in run() [all …]
|