Skip to content

Commit

Permalink
Ignore let_underscore_untyped pedantic clippy lint
Browse files Browse the repository at this point in the history
    error: non-binding `let` without a type annotation
       --> src/error.rs:618:5
        |
    618 |     let _ = target;
        |     ^^^^^^^^^^^^^^^
        |
        = help: consider adding a type annotation or removing the `let` keyword
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_untyped
        = note: `-D clippy::let-underscore-untyped` implied by `-D clippy::pedantic`

    error: non-binding `let` without a type annotation
      --> tests/test_backtrace.rs:12:5
       |
    12 |     let _ = error.backtrace();
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider adding a type annotation or removing the `let` keyword
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_untyped
       = note: `-D clippy::let-underscore-untyped` implied by `-D clippy::pedantic`

    error: non-binding `let` without a type annotation
      --> tests/test_ensure.rs:35:9
       |
    35 |         let _ = rhs;
       |         ^^^^^^^^^^^^
       |
       = help: consider adding a type annotation or removing the `let` keyword
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_untyped
       = note: `-D clippy::let-underscore-untyped` implied by `-D clippy::pedantic`
  • Loading branch information
dtolnay committed Feb 27, 2023
1 parent 2c2803f commit d30b027
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
clippy::enum_glob_use,
clippy::explicit_auto_deref,
clippy::extra_unused_type_parameters,
clippy::let_underscore_untyped,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::module_name_repetitions,
Expand Down
2 changes: 2 additions & 0 deletions tests/test_backtrace.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::let_underscore_untyped)]

#[rustversion::not(nightly)]
#[ignore]
#[test]
Expand Down
1 change: 1 addition & 0 deletions tests/test_ensure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
clippy::ifs_same_cond,
clippy::items_after_statements,
clippy::let_and_return,
clippy::let_underscore_untyped,
clippy::match_bool,
clippy::never_loop,
clippy::overly_complex_bool_expr,
Expand Down

0 comments on commit d30b027

Please sign in to comment.