-
Notifications
You must be signed in to change notification settings - Fork 2k
MSRV-aware std_instead_of_core #13158
Copy link
Copy link
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Items sometimes move from
stdtocore. For example,*UnwindSafehave moved,std::error::Errorwill move in Rust 1.81.0, andstd::io::Errormight 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_allocwere MSRV-aware and only fired if the item in question is stable incoreorallocat 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