]> git.lizzy.rs Git - rust.git/commit
Add `let_underscore_must_use` lint.
authorAaron Kofsky <aaronko@umich.edu>
Thu, 2 Jun 2022 18:58:44 +0000 (14:58 -0400)
committerAaron Kofsky <aaronko@umich.edu>
Sat, 4 Jun 2022 19:35:08 +0000 (15:35 -0400)
commit758a9fd0f9ac191f0ea99215e07816631f402b7e
treeceaa4a555c0f8fd3501404dbe9f3d97098fa9aa2
parentad7587fedcf29a6629e0218f0e180ddf8960461d
 Add `let_underscore_must_use` lint.

Similar to `let_underscore_drop`, this lint checks for statements similar
to `let _ = foo`, where `foo` is an expression marked `must_use`.
compiler/rustc_lint/src/let_underscore.rs
compiler/rustc_lint/src/lib.rs
src/test/ui/let_underscore_must_use.rs [new file with mode: 0644]
src/test/ui/let_underscore_must_use.stderr [new file with mode: 0644]