From d9447c30eb0ff682923499dfb18fb229d5dea84d Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 26 Feb 2023 23:03:08 -0700 Subject: [PATCH] Ignore let_underscore_untyped pedantic clippy lint error: non-binding `let` without a type annotation --> src/de.rs:1712:9 | 1712 | let _ = name; | ^^^^^^^^^^^^^ | = 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 --> src/de.rs:2190:9 | 2190 | let _ = name; | ^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> src/map.rs:51:17 | 51 | let _ = capacity; | ^^^^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> src/value/de.rs:312:9 | 312 | let _ = name; | ^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> src/value/de.rs:803:9 | 803 | let _ = name; | ^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/lexical/num.rs:26:5 | 26 | let _ = x; | ^^^^^^^^^^ | = 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/lexical/num.rs:31:5 | 31 | let _ = y + x; | ^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/lexical/num.rs:48:5 | 48 | let _ = x & T::ZERO; | ^^^^^^^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/lexical/num.rs:61:5 | 61 | let _ = x.pow10(5); | ^^^^^^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/lexical/num.rs:62:5 | 62 | let _ = x.to_bits(); | ^^^^^^^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/lexical/num.rs:66:5 | 66 | let _ = x.to_bits() & T::SIGN_MASK; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/lexical/num.rs:67:5 | 67 | let _ = x.to_bits() & T::EXPONENT_MASK; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/lexical/num.rs:68:5 | 68 | let _ = x.to_bits() & T::HIDDEN_BIT_MASK; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/lexical/num.rs:69:5 | 69 | let _ = x.to_bits() & T::MANTISSA_MASK; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 error: non-binding `let` without a type annotation --> tests/test.rs:1977:5 | 1977 | / let _ = json!([ 1978 | | as Clone>::clone(&Ok(())), 1979 | | as Clone>::clone(&Err(())) 1980 | | ]); | |_______^ | = 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.rs:1983:5 | 1983 | / let _ = json!({ 1984 | | "ok": as Clone>::clone(&Ok(())), 1985 | | "err": as Clone>::clone(&Err(())) 1986 | | }); | |_______^ | = 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 error: non-binding `let` without a type annotation --> tests/test.rs:1989:5 | 1989 | / let _ = json!({ 1990 | | ( as Clone>::clone(&Ok("")).unwrap()): "ok", 1991 | | ( as Clone>::clone(&Err("")).unwrap_err()): "err" 1992 | | }); | |_______^ | = 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 error: non-binding `let` without a type annotation --> tests/test.rs:1995:5 | 1995 | let _ = json!({ "architecture": [true, null] }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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 --- src/lib.rs | 1 + tests/lexical.rs | 1 + tests/test.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 48d0fe219..8909f0db4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -338,6 +338,7 @@ clippy::enum_glob_use, clippy::if_not_else, clippy::integer_division, + clippy::let_underscore_untyped, clippy::map_err_ignore, clippy::match_same_arms, clippy::similar_names, diff --git a/tests/lexical.rs b/tests/lexical.rs index 6e0f07b8c..d3dfb852b 100644 --- a/tests/lexical.rs +++ b/tests/lexical.rs @@ -9,6 +9,7 @@ clippy::excessive_precision, clippy::float_cmp, clippy::if_not_else, + clippy::let_underscore_untyped, clippy::module_name_repetitions, clippy::needless_late_init, clippy::shadow_unrelated, diff --git a/tests/test.rs b/tests/test.rs index f62a545e7..6c08cc8d2 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -6,6 +6,7 @@ clippy::excessive_precision, clippy::float_cmp, clippy::items_after_statements, + clippy::let_underscore_untyped, clippy::shadow_unrelated, clippy::too_many_lines, clippy::unreadable_literal,