-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let_underscore_untyped fails to consider configured msrv #10410
Comments
Mentioning @JirkaVebr @llogiq since this lint is from #10356. |
rust-lang/rust-clippy#10410 error: non-binding `let` without a type annotation --> src/term.rs:70:9 | 70 | let _ = self.stream.reset(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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/term.rs:85:17 | 85 | let _ = self.stream.set_color(&self.spec); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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/cargo.rs:70:9 | 70 | let _ = fs::copy(workspace_cargo_lock, path!(project.dir / "Cargo.lock")); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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/cargo.rs:72:9 | 72 | let _ = cargo(project).arg("generate-lockfile").status(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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/cargo.rs:102:5 | 102 | / let _ = cargo(project) 103 | | .arg("clean") 104 | | .arg("--package") 105 | | .arg(&project.name) ... | 108 | | .stderr(Stdio::null()) 109 | | .status(); | |__________________^ | = 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/cargo.rs:125:5 | 125 | / let _ = cargo(project) 126 | | .arg("clean") 127 | | .arg("--package") 128 | | .arg(&project.name) ... | 131 | | .stderr(Stdio::null()) 132 | | .status(); | |__________________^ | = 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/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/cargo.rs:170:9 | 170 | print!("{}", String::from_utf8_lossy(&output.stderr)); | ----------------------------------------------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/diff.rs:77:13 | 77 | let _ = Render::Common; | ^^^^^^^^^^^^^^^^^^^^^^^ | = 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/diff.rs:78:13 | 78 | let _ = Render::Unique; | ^^^^^^^^^^^^^^^^^^^^^^^ | = 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/flock.rs:87:17 | 87 | let _ = fs::remove_file(path); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:22:5 | 22 | print!("ERROR"); | --------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:24:5 | 24 | println!(": {}", err); | --------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:25:5 | 25 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:34:5 | 34 | println!("error"); | ----------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:36:5 | 36 | println!("{}", err); | ------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:38:5 | 38 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:43:5 | 43 | println!("There are no trybuild tests enabled yet."); | ---------------------------------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:49:5 | 49 | println!("ok"); | -------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:56:5 | 56 | print!("test "); | --------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:58:5 | 58 | print!("{}", display_name); | -------------------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:63:31 | 63 | Expected::Pass => print!(" [should pass]"), | ------------------------ in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:64:38 | 64 | Expected::CompileFail => print!(" [should fail to compile]"), | ----------------------------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:68:5 | 68 | print!(" ... "); | --------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:73:5 | 73 | println!("error"); | ----------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:75:5 | 75 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:80:5 | 80 | println!("error"); | ----------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:82:5 | 82 | println!("Expected test case to fail to compile, but it succeeded."); | -------------------------------------------------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:84:5 | 84 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:92:5 | 92 | println!("wip"); | --------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:93:5 | 93 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:94:5 | 94 | print!("NOTE"); | -------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:96:5 | 96 | println!(": writing the following output to `{}`.", wip_path); | ------------------------------------------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:97:5 | 97 | / println!( 98 | | "Move this file to `{}` to accept it as correct.", 99 | | stderr_path, 100 | | ); | |_____- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:102:5 | 102 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:109:5 | 109 | println!("wip"); | --------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:110:5 | 110 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:111:5 | 111 | print!("NOTE"); | -------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:113:5 | 113 | println!(": writing the following output to `{}`.", stderr_path); | ---------------------------------------------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:115:5 | 115 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:120:5 | 120 | println!("mismatch"); | -------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:122:5 | 122 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:130:5 | 130 | println!("EXPECTED:"); | --------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:132:5 | 132 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:134:5 | 134 | println!("ACTUAL OUTPUT:"); | -------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:136:5 | 136 | print!("note: If the "); | ----------------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:138:5 | 138 | print!("actual output"); | ----------------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:140:5 | 140 | println!(" is the correct output you can bless it by rerunning"); | ---------------------------------------------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:141:5 | 141 | println!(" your test with the environment variable TRYBUILD=overwrite"); | ---------------------------------------------------------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:142:5 | 142 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:154:13 | 154 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:158:9 | 158 | println!("error"); | ----------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:161:13 | 161 | println!("Test case failed at runtime."); | ---------------------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:163:13 | 163 | ... println!("Execution of the test case was unsuccessful but there was no output."); | -------------------------------------------------------------------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:166:9 | 166 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:176:13 | 176 | println!("{}:", name); | --------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:178:13 | 178 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:191:9 | 191 | println!("STDOUT:"); | ------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:193:9 | 193 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:203:5 | 203 | println!("WARNINGS:"); | --------------------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:205:5 | 205 | println!(); | ---------- in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:42:9 | 42 | let _ = std::writeln!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:214:9 | 214 | println!("{}", "┈".repeat(60)); | ------------------------------ in this macro invocation | = 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: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:226:25 | 226 | print!("{}", s); | --------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:230:25 | 230 | print!("\x1B[7m{}", s); | ---------------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/message.rs:235:17 | 235 | None => print!("{}", content), | --------------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/run.rs:64:9 | 64 | print!("\n\n"); | -------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error: non-binding `let` without a type annotation --> src/term.rs:34:9 | 34 | let _ = std::write!($crate::term::lock(), $($args)*); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/run.rs:98:9 | 98 | print!("\n\n"); | -------------- in this macro invocation | = 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: this error originates in the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info)
rust-lang/rust-clippy#10410 error: non-binding `let` without a type annotation --> build.rs:20:5 | 20 | let _ = compiler.minor; | ^^^^^^^^^^^^^^^^^^^^^^^ | = 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/lookahead.rs:104:9 | 104 | let _ = token; | ^^^^^^^^^^^^^^ | = 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/parse.rs:379:5 | 379 | let _ = proof; | ^^^^^^^^^^^^^^ | = 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/parse.rs:580:9 | 580 | let _ = token; | ^^^^^^^^^^^^^^ | = 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/parse.rs:628:9 | 628 | let _ = token; | ^^^^^^^^^^^^^^ | = 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/parse.rs:647:9 | 647 | let _ = token; | ^^^^^^^^^^^^^^ | = 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/parse.rs:751:9 | 751 | let _ = separator; | ^^^^^^^^^^^^^^^^^^ | = 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/parse.rs:1229:9 | 1229 | let _ = scope; | ^^^^^^^^^^^^^^ | = 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
rust-lang/rust-clippy#10410 error: non-binding `let` without a type annotation --> build.rs:20:5 | 20 | let _ = compiler.minor; | ^^^^^^^^^^^^^^^^^^^^^^^ | = 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/lookahead.rs:104:9 | 104 | let _ = token; | ^^^^^^^^^^^^^^ | = 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/parse.rs:379:5 | 379 | let _ = proof; | ^^^^^^^^^^^^^^ | = 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/parse.rs:580:9 | 580 | let _ = token; | ^^^^^^^^^^^^^^ | = 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/parse.rs:628:9 | 628 | let _ = token; | ^^^^^^^^^^^^^^ | = 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/parse.rs:647:9 | 647 | let _ = token; | ^^^^^^^^^^^^^^ | = 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/parse.rs:751:9 | 751 | let _ = separator; | ^^^^^^^^^^^^^^^^^^ | = 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/parse.rs:1229:9 | 1229 | let _ = scope; | ^^^^^^^^^^^^^^ | = 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
Doesn't seem like a false positive. I'm not sure what the point of the suggestion to remove the This might be better as a |
Based on the message outputted by the lint, I assumed this to be a "why waste time say lot word when few word do trick" lint: i.e. with the motivation that now that
Yeah, going back and reading #6842, it seems my assumed interpretation is not at all the rationale behind the lint originally proposed. The purported reason that |
@dtolnay First of all, I'm really sorry about this issue. This was my first ever contribution made at @llogiq's excellent Clippy workshop, and I'm definitely no expert on this. The intention behind the lint wasn't primarily to save tokens by dropping the
Is the message too misleading then? Perhaps it should be more clear that the recommended resolution is to provide the type ascription? Regarding the MSRV, that is just a bug and an oversight on our part, thanks for pointing that out. For older versions of Rust, should it not recommend dropping the |
IMO clippy should not ever suggest replacing |
I also think this might be better as a restriction lint. |
Downgrade let_underscore_untyped to restriction From reading #6842 I am not convinced of the cost/benefit of this lint even as a pedantic lint. It sounds like the primary motivation was to catch cases of `fn() -> Result` being changed to `async fn() -> Result`. If the original Result was ignored by a `let _`, then the compiler wouldn't guide you to add `.await`. **However, this situation is caught in a more specific way by [let_underscore_future](https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future) which was introduced _after_ the original suggestion (#9760).** In #10410 it was mentioned twice that a <kbd>restriction</kbd> lint might be more appropriate for let_underscore_untyped. changelog: Moved [`let_underscore_untyped`] to restriction
I can think of one advantage to Normally On the other hand, when I see a destructuring assignment like |
I don't agree @ryanavella -- overall I don't feel that |
I think the fundamental problem really are types that cannot be named (#10411). If I recall correctly, @llogiq said that it is either incredibly difficult or even impossible for Clippy to identify these, and so the suggestion to drop the I do fully agree that Separately, the MSRV and #10441 are just bugs that could be fixed right away no matter the answer to these questions. I would love to contribute a fix but I was hoping to first also hear @llogiq's thoughts on all this. Which path could/should the fix take? Can we recognize unnameable types? |
@rustbot claim |
Summary
Clippy's let_underscore_untyped lint triggers on code that is 100% good and idiomatic in projects that target 1.58 or older.
Lint Name
let_underscore_untyped
Reproducer
Clippy's suggested code does not compile.
Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: