You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix [std_instead_of_core]: false positives for core::io/MSRV (#16964)
# Objective
- Fix false positive identified by @rktaxe in [this
comment](#13158 (comment))
on #13158.
- Fix#13158
## Solution
Previously the lint had an exception for all instances of a stable item
in an unstable module, primarily to allow certain intrinsics such as
`copy` to be accessible. Instead, I check for the presence of
`rustc_allowed_through_unstable_modules` to handle those exceptions, and
allow the `is_stable` check within the lint to early out as soon as any
part of its path is unstable.
I believe this was the last piece required to resolve#13158, and have added tests for all examples
listed in the issue. If there are other examples of this lint failing,
I'd greatly appreciate seeing them!
---
## Notes
- No AI tooling of any kind was used during the creation of this PR.
- Originally opened (in error) as rust-lang/rust#156164
---
*Please write a short comment explaining your change (or "none" for
internal only changes)*
changelog: fix certain false positives for [`std_instead_of_core`] for
stable items in an unstable module (e.g., `core::io::ErrorKind`), and
other MSRV-unaware issues.
0 commit comments