Skip to content

Commit 04374cd

Browse files
committed
Auto merge of #114089 - Urgau:allow-with-implied-by, r=petrochenkov
Add an allow attribute suggestion along with the implied by suggestion This PR adds an `#[allow(...)]` attribute hep suggestion along with the implied by suggestion: ```diff note: `-W dead-code` implied by `-W unused` + help: to override `-W unused` add `#[allow(dead_code)]` ``` This PR also adds the `OnceHelp` lint level (similar to `OnceNote`) to only put the help message one time, like the implied note. Related to #114030
2 parents ec08a03 + 9190e96 commit 04374cd

File tree

770 files changed

+871
-5
lines changed

Some content is hidden

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

770 files changed

+871
-5
lines changed

compiler/rustc_errors/src/annotate_snippet_emitter_writer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn annotation_type_for_level(level: Level) -> AnnotationType {
9191
}
9292
Level::Warning(_) => AnnotationType::Warning,
9393
Level::Note | Level::OnceNote => AnnotationType::Note,
94-
Level::Help => AnnotationType::Help,
94+
Level::Help | Level::OnceHelp => AnnotationType::Help,
9595
// FIXME(#59346): Not sure how to map this level
9696
Level::FailureNote => AnnotationType::Error,
9797
Level::Allow => panic!("Should not call with Allow"),

compiler/rustc_errors/src/diagnostic.rs

+8
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ impl Diagnostic {
270270
| Level::Note
271271
| Level::OnceNote
272272
| Level::Help
273+
| Level::OnceHelp
273274
| Level::Allow
274275
| Level::Expect(_) => false,
275276
}
@@ -532,6 +533,13 @@ impl Diagnostic {
532533
self
533534
}
534535

536+
/// Prints the span with a help above it.
537+
/// This is like [`Diagnostic::help()`], but it gets its own span.
538+
pub fn help_once(&mut self, msg: impl Into<SubdiagnosticMessage>) -> &mut Self {
539+
self.sub(Level::OnceHelp, msg, MultiSpan::new(), None);
540+
self
541+
}
542+
535543
/// Add a help message attached to this diagnostic with a customizable highlighted message.
536544
pub fn highlighted_help(&mut self, msg: Vec<(String, Style)>) -> &mut Self {
537545
self.sub_with_highlights(Level::Help, msg, MultiSpan::new(), None);

compiler/rustc_errors/src/lib.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ impl HandlerInner {
13901390
debug!(?self.emitted_diagnostics);
13911391
let already_emitted_sub = |sub: &mut SubDiagnostic| {
13921392
debug!(?sub);
1393-
if sub.level != Level::OnceNote {
1393+
if sub.level != Level::OnceNote && sub.level != Level::OnceHelp {
13941394
return false;
13951395
}
13961396
let mut hasher = StableHasher::new();
@@ -1792,6 +1792,8 @@ pub enum Level {
17921792
/// A note that is only emitted once.
17931793
OnceNote,
17941794
Help,
1795+
/// A help that is only emitted once.
1796+
OnceHelp,
17951797
FailureNote,
17961798
Allow,
17971799
Expect(LintExpectationId),
@@ -1816,7 +1818,7 @@ impl Level {
18161818
Note | OnceNote => {
18171819
spec.set_fg(Some(Color::Green)).set_intense(true);
18181820
}
1819-
Help => {
1821+
Help | OnceHelp => {
18201822
spec.set_fg(Some(Color::Cyan)).set_intense(true);
18211823
}
18221824
FailureNote => {}
@@ -1831,7 +1833,7 @@ impl Level {
18311833
Fatal | Error { .. } => "error",
18321834
Warning(_) => "warning",
18331835
Note | OnceNote => "note",
1834-
Help => "help",
1836+
Help | OnceHelp => "help",
18351837
FailureNote => "failure-note",
18361838
Allow => panic!("Shouldn't call on allowed error"),
18371839
Expect(_) => panic!("Shouldn't call on expected error"),

compiler/rustc_middle/src/lint.rs

+3
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ pub fn explain_lint_level_source(
225225
err.note_once(format!(
226226
"`{flag} {hyphen_case_lint_name}` implied by `{flag} {hyphen_case_flag_val}`"
227227
));
228+
err.help_once(format!(
229+
"to override `{flag} {hyphen_case_flag_val}` add `#[allow({name})]`"
230+
));
228231
}
229232
}
230233
LintLevelSource::Node { name: lint_attr_name, span, reason, .. } => {

src/tools/clippy/tests/ui-toml/absolute_paths/absolute_paths.allow_crates.stderr

+1
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

src/tools/clippy/tests/ui-toml/absolute_paths/absolute_paths.disallow_crates.stderr

+1
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

src/tools/clippy/tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.stderr

+2
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);

src/tools/clippy/tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.stderr

+1
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

src/tools/clippy/tests/ui-toml/array_size_threshold/array_size_threshold.stderr

+2
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

src/tools/clippy/tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.stderr

+1
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

src/tools/clippy/tests/ui-toml/conf_deprecated_key/conf_deprecated_key.stderr

+1
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

src/tools/clippy/tests/ui-toml/dbg_macro/dbg_macro.stderr

+1
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 }

src/tools/clippy/tests/ui-toml/disallowed_macros/disallowed_macros.stderr

+1
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

src/tools/clippy/tests/ui-toml/disallowed_names_append/disallowed_names.stderr

+1
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

src/tools/clippy/tests/ui-toml/disallowed_names_replace/disallowed_names.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | let ducks = ["quack", "quack"];
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: aborting due to previous error
1011

src/tools/clippy/tests/ui-toml/doc_valid_idents_append/doc_markdown.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | /// TestItemThingyOfCoolness might sound cool but is not on the list and sh
55
| ^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::doc-markdown` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::doc_markdown)]`
89
help: try
910
|
1011
LL | /// `TestItemThingyOfCoolness` might sound cool but is not on the list and should be linted.

src/tools/clippy/tests/ui-toml/doc_valid_idents_replace/doc_markdown.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | /// OAuth and LaTeX are inside Clippy's default list.
55
| ^^^^^
66
|
77
= note: `-D clippy::doc-markdown` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::doc_markdown)]`
89
help: try
910
|
1011
LL | /// `OAuth` and LaTeX are inside Clippy's default list.

src/tools/clippy/tests/ui-toml/excessive_nesting/excessive_nesting.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LL | let w = { 3 };
66
|
77
= help: try refactoring your code to minimize nesting
88
= note: `-D clippy::excessive-nesting` implied by `-D warnings`
9+
= help: to override `-D warnings` add `#[allow(clippy::excessive_nesting)]`
910

1011
error: this block is too nested
1112
--> $DIR/excessive_nesting.rs:67:17

src/tools/clippy/tests/ui-toml/expect_used/expect_used.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LL | let _ = opt.expect("");
66
|
77
= note: if this value is `None`, it will panic
88
= note: `-D clippy::expect-used` implied by `-D warnings`
9+
= help: to override `-D warnings` add `#[allow(clippy::expect_used)]`
910

1011
error: used `expect()` on a `Result` value
1112
--> $DIR/expect_used.rs:12:13

src/tools/clippy/tests/ui-toml/fn_params_excessive_bools/test.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LL | fn g(_: bool, _: bool) {}
66
|
77
= help: consider refactoring bools into two-variant enums
88
= note: `-D clippy::fn-params-excessive-bools` implied by `-D warnings`
9+
= help: to override `-D warnings` add `#[allow(clippy::fn_params_excessive_bools)]`
910

1011
error: aborting due to previous error
1112

src/tools/clippy/tests/ui-toml/functions_maxlines/test.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ LL | | }
88
| |_^
99
|
1010
= note: `-D clippy::too-many-lines` implied by `-D warnings`
11+
= help: to override `-D warnings` add `#[allow(clippy::too_many_lines)]`
1112

1213
error: this function has too many lines (4/1)
1314
--> $DIR/test.rs:25:1

src/tools/clippy/tests/ui-toml/ifs_same_cond/ifs_same_cond.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ note: same as this
1010
LL | if x.get() {
1111
| ^^^^^^^
1212
= note: `-D clippy::ifs-same-cond` implied by `-D warnings`
13+
= help: to override `-D warnings` add `#[allow(clippy::ifs_same_cond)]`
1314

1415
error: aborting due to previous error
1516

src/tools/clippy/tests/ui-toml/large_futures/large_futures.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | should_warn().await;
55
| ^^^^^^^^^^^^^ help: consider `Box::pin` on it: `Box::pin(should_warn())`
66
|
77
= note: `-D clippy::large-futures` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::large_futures)]`
89

910
error: aborting due to previous error
1011

src/tools/clippy/tests/ui-toml/large_include_file/large_include_file.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LL | const TOO_BIG_INCLUDE_BYTES: &[u8; 654] = include_bytes!("too_big.txt");
66
|
77
= note: the configuration allows a maximum size of 600 bytes
88
= note: `-D clippy::large-include-file` implied by `-D warnings`
9+
= help: to override `-D warnings` add `#[allow(clippy::large_include_file)]`
910
= note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
1011

1112
error: attempted to include a large file

src/tools/clippy/tests/ui-toml/lint_decimal_readability/test.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | let _fail1 = 100_200_300.123456789;
55
| ^^^^^^^^^^^^^^^^^^^^^ help: consider: `100_200_300.123_456_789`
66
|
77
= note: `-D clippy::inconsistent-digit-grouping` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::inconsistent_digit_grouping)]`
89

910
error: long literal lacking separators
1011
--> $DIR/test.rs:22:18
@@ -13,6 +14,7 @@ LL | let _fail2 = 100200300.300200100;
1314
| ^^^^^^^^^^^^^^^^^^^ help: consider: `100_200_300.300_200_100`
1415
|
1516
= note: `-D clippy::unreadable-literal` implied by `-D warnings`
17+
= help: to override `-D warnings` add `#[allow(clippy::unreadable_literal)]`
1618

1719
error: aborting due to 2 previous errors
1820

src/tools/clippy/tests/ui-toml/min_ident_chars/min_ident_chars.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | use extern_types::Aaa;
55
| ^^^
66
|
77
= note: `-D clippy::min-ident-chars` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::min_ident_chars)]`
89

910
error: this ident is too short (3 <= 3)
1011
--> $DIR/min_ident_chars.rs:10:5

src/tools/clippy/tests/ui-toml/min_rust_version/min_rust_version.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | let _: Option<u64> = Some(&16).map(|b| *b);
55
| ^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `Some(&16).cloned()`
66
|
77
= note: `-D clippy::map-clone` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::map_clone)]`
89

910
error: aborting due to previous error
1011

src/tools/clippy/tests/ui-toml/missing_enforced_import_rename/conf_missing_enforced_import_rename.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | use std::process::{exit as wrong_exit, Child as Kid};
55
| ^^^^^^^^^^^^^^^^^^ help: try: `exit as goodbye`
66
|
77
= note: `-D clippy::missing-enforced-import-renames` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::missing_enforced_import_renames)]`
89

910
error: this import should be renamed
1011
--> $DIR/conf_missing_enforced_import_rename.rs:6:1

src/tools/clippy/tests/ui-toml/module_inception/module_inception.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ LL | | }
77
| |_________^
88
|
99
= note: `-D clippy::module-inception` implied by `-D warnings`
10+
= help: to override `-D warnings` add `#[allow(clippy::module_inception)]`
1011

1112
error: module has the same name as its containing module
1213
--> $DIR/module_inception.rs:11:5

src/tools/clippy/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | let _ = vec! {1, 2, 3};
55
| ^^^^^^^^^^^^^^ help: consider writing: `vec![1, 2, 3]`
66
|
77
= note: `-D clippy::nonstandard-macro-braces` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::nonstandard_macro_braces)]`
89

910
error: use of irregular braces for `format!` macro
1011
--> $DIR/conf_nonstandard_macro_braces.rs:44:13

src/tools/clippy/tests/ui-toml/print_macro/print_macro.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | print!("{n}");
55
| ^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::print-stdout` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::print_stdout)]`
89

910
error: use of `eprint!`
1011
--> $DIR/print_macro.rs:7:5
@@ -13,6 +14,7 @@ LL | eprint!("{n}");
1314
| ^^^^^^^^^^^^^^
1415
|
1516
= note: `-D clippy::print-stderr` implied by `-D warnings`
17+
= help: to override `-D warnings` add `#[allow(clippy::print_stderr)]`
1618

1719
error: aborting due to 2 previous errors
1820

src/tools/clippy/tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | pub(crate) fn crate_no_docs() {}
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::missing-docs-in-private-items` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::missing_docs_in_private_items)]`
89

910
error: missing documentation for a function
1011
--> $DIR/pub_crate_missing_doc.rs:15:5

src/tools/clippy/tests/ui-toml/semicolon_block/both.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | { unit_fn_block(); }
55
| ^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::semicolon-outside-block` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::semicolon_outside_block)]`
89
help: put the `;` here
910
|
1011
LL - { unit_fn_block(); }
@@ -33,6 +34,7 @@ LL | | };
3334
| |______^
3435
|
3536
= note: `-D clippy::semicolon-inside-block` implied by `-D warnings`
37+
= help: to override `-D warnings` add `#[allow(clippy::semicolon_inside_block)]`
3638
help: put the `;` here
3739
|
3840
LL ~ unit_fn_block();

src/tools/clippy/tests/ui-toml/semicolon_block/semicolon_inside_block.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ LL | | };
88
| |______^
99
|
1010
= note: `-D clippy::semicolon-inside-block` implied by `-D warnings`
11+
= help: to override `-D warnings` add `#[allow(clippy::semicolon_inside_block)]`
1112
help: put the `;` here
1213
|
1314
LL ~ unit_fn_block();

src/tools/clippy/tests/ui-toml/semicolon_block/semicolon_outside_block.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | { unit_fn_block(); }
55
| ^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::semicolon-outside-block` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(clippy::semicolon_outside_block)]`
89
help: put the `;` here
910
|
1011
LL - { unit_fn_block(); }

src/tools/clippy/tests/ui-toml/strict_non_send_fields_in_send_ty/test.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ LL | rc_is_not_send: Rc<String>,
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
= help: use a thread-safe type that implements `Send`
1313
= note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings`
14+
= help: to override `-D warnings` add `#[allow(clippy::non_send_fields_in_send_ty)]`
1415

1516
error: some fields in `MultiField<T>` are not safe to be sent to another thread
1617
--> $DIR/test.rs:19:1

src/tools/clippy/tests/ui-toml/struct_excessive_bools/test.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ LL | | }
88
|
99
= help: consider using a state machine or refactoring bools into two-variant enums
1010
= note: `-D clippy::struct-excessive-bools` implied by `-D warnings`
11+
= help: to override `-D warnings` add `#[allow(clippy::struct_excessive_bools)]`
1112

1213
error: aborting due to previous error
1314

src/tools/clippy/tests/ui-toml/suppress_lint_in_const/test.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ LL | x[index];
1818
|
1919
= help: consider using `.get(n)` or `.get_mut(n)` instead
2020
= note: `-D clippy::indexing-slicing` implied by `-D warnings`
21+
= help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]`
2122

2223
error: indexing may panic
2324
--> $DIR/test.rs:46:5

src/tools/clippy/tests/ui-toml/toml_disallow/conf_french_disallowed_name.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | fn test(toto: ()) {}
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 `toto`
1011
--> $DIR/conf_french_disallowed_name.rs:9:9

0 commit comments

Comments
 (0)