Skip to content

Commit 0fc8bb5

Browse files
Rollup merge of rust-lang#153018 - WaffleLapkin:must_use_improvements, r=jdonszelmann
`unused_must_use` lint improvements The main purpose of this is to allow clippy to use `is_ty_must_use` from rustc, rather than making their own (outdated) copy. This also adds changes from rust-lang#148214 under a function flag, so clippy can start linting with the new semantics in mind, while rustc doesn't yet (see rust-lang#148214 (comment)). I've also done some refactoring while I was at it. r? @jdonszelmann
2 parents ce244ea + 1b97e9b commit 0fc8bb5

File tree

3 files changed

+654
-566
lines changed

3 files changed

+654
-566
lines changed

compiler/rustc_lint/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ mod transmute;
7878
mod types;
7979
mod unit_bindings;
8080
mod unqualified_local_imports;
81-
mod unused;
81+
pub mod unused;
8282
mod utils;
8383

8484
use async_closures::AsyncClosureUsage;
@@ -125,6 +125,7 @@ use transmute::CheckTransmutes;
125125
use types::*;
126126
use unit_bindings::*;
127127
use unqualified_local_imports::*;
128+
use unused::must_use::*;
128129
use unused::*;
129130

130131
#[rustfmt::skip]

0 commit comments

Comments
 (0)