MSRV-aware std_instead_of_core
#13158
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Items sometimes move from
std
tocore
. For example,*UnwindSafe
have moved,std::error::Error
will move in Rust 1.81.0, andstd::io::Error
might someday.When this happens, anyone who uses clippy from nightly or beta, or newer than their MSRV, will get lints they cannot satisfy. Therefore, it would be useful if
std_instead_of_core
,alloc_instead_of_core
, andstd_instead_of_alloc
were MSRV-aware and only fired if the item in question is stable incore
oralloc
at the declared MSRV.Lint Name
std_instead_of_core, alloc_instead_of_core, std_instead_of_alloc
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: No warning
Version
Additional Labels
@rustbot label -C-bug +C-enhancement
The text was updated successfully, but these errors were encountered: