Skip to content

Commit a86e758

Browse files
committed
Adjust clippy tests with new rustc help suggestion for lints
1 parent a0ebcc3 commit a86e758

File tree

751 files changed

+838
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

751 files changed

+838
-0
lines changed

tests/ui-toml/absolute_paths/absolute_paths.allow_crates.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | std::f32::MAX;
55
| ^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::absolute-paths` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::absolute_paths)]`
89

910
error: consider bringing this path into scope with the `use` keyword
1011
--> $DIR/absolute_paths.rs:41:5

tests/ui-toml/absolute_paths/absolute_paths.disallow_crates.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | std::f32::MAX;
55
| ^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::absolute-paths` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::absolute_paths)]`
89

910
error: consider bringing this path into scope with the `use` keyword
1011
--> $DIR/absolute_paths.rs:41:5

tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | println!("val='{}'", local_i32);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::uninlined-format-args` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`
89
help: change this to
910
|
1011
LL - println!("val='{}'", local_i32);
@@ -30,6 +31,7 @@ LL | println!("Hello {} is {:.*}", "x", local_i32, local_f64);
3031
| ^^^
3132
|
3233
= note: `-D clippy::print-literal` implied by `-D warnings`
34+
= help: to override `-D warnings` add `#[allow(clippy::print_literal)]`
3335
help: try
3436
|
3537
LL - println!("Hello {} is {:.*}", "x", local_i32, local_f64);

tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | let _ = Baz + Baz;
55
| ^^^^^^^^^
66
|
77
= note: `-D clippy::arithmetic-side-effects` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::arithmetic_side_effects)]`
89

910
error: arithmetic operation that can potentially result in unexpected side-effects
1011
--> $DIR/arithmetic_side_effects_allowed.rs:80:13

tests/ui-toml/array_size_threshold/array_size_threshold.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ LL | const ABOVE: [u8; 11] = [0; 11];
77
| help: make this a static item: `static`
88
|
99
= note: `-D clippy::large-const-arrays` implied by `-D warnings`
10+
= help: to override `-D warnings` add `#[allow(clippy::large_const_arrays)]`
1011

1112
error: allocating a local array larger than 10 bytes
1213
--> $DIR/array_size_threshold.rs:4:25
@@ -16,6 +17,7 @@ LL | const ABOVE: [u8; 11] = [0; 11];
1617
|
1718
= help: consider allocating on the heap with `vec![0; 11].into_boxed_slice()`
1819
= note: `-D clippy::large-stack-arrays` implied by `-D warnings`
20+
= help: to override `-D warnings` add `#[allow(clippy::large_stack_arrays)]`
1921

2022
error: allocating a local array larger than 10 bytes
2123
--> $DIR/array_size_threshold.rs:8:17

tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LL | let _x = String::from("hello");
66
|
77
= note: strings are bad (from clippy.toml)
88
= note: `-D clippy::await-holding-invalid-type` implied by `-D warnings`
9+
= help: to override `-D warnings` add `#[allow(clippy::await_holding_invalid_type)]`
910

1011
error: `std::net::Ipv4Addr` may not be held across an `await` point per `clippy.toml`
1112
--> $DIR/await_holding_invalid_type.rs:10:9

tests/ui-toml/conf_deprecated_key/conf_deprecated_key.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ LL | fn cognitive_complexity() {
1818
|
1919
= help: you could split it up into multiple smaller functions
2020
= note: `-D clippy::cognitive-complexity` implied by `-D warnings`
21+
= help: to override `-D warnings` add `#[allow(clippy::cognitive_complexity)]`
2122

2223
error: aborting due to previous error; 2 warnings emitted
2324

tests/ui-toml/dbg_macro/dbg_macro.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::dbg-macro` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::dbg_macro)]`
89
help: remove the invocation before committing it to a version control system
910
|
1011
LL | if let Some(n) = n.checked_sub(4) { n } else { n }

tests/ui-toml/disallowed_macros/disallowed_macros.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | println!("one");
55
| ^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::disallowed-macros` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::disallowed_macros)]`
89

910
error: use of a disallowed macro `std::println`
1011
--> $DIR/disallowed_macros.rs:11:5

tests/ui-toml/disallowed_names_append/disallowed_names.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | let foo = "bar";
55
| ^^^
66
|
77
= note: `-D clippy::disallowed-names` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::disallowed_names)]`
89

910
error: use of a disallowed/placeholder name `ducks`
1011
--> $DIR/disallowed_names.rs:7:9

0 commit comments

Comments
 (0)