rust-clippy
rust-clippy copied to clipboard
Add new `UNSTABLE_INTRINSICS_WITH_STABLE_WRAPPER` lint
Fixes #2997.
To prevent having to keep the list of intrinsics with stable counterpart up-to-date on clippy side, I instead check if the documentation contains the sentence "does not have a stable counterpart"
. To prevent running this check more than once, I store all the non-matching intrinsics DefId
into a static
.
r? @llogiq
changelog: Add new UNSTABLE_INTRINSICS_WITH_STABLE_WRAPPER
lint
Interestingly enough, we cannot differentiate between the intrinsics item and the "reexported" one (like for std::ptr::write_bytes
). I'll try to extract more information to ensure which call is actually performed.
Took me a while to realize that the error was coming from the doc example... ^^'
PR is now ready!
:umbrella: The latest upstream changes (presumably #12306) made this pull request unmergeable. Please resolve the merge conflicts.
Hey @GuillaumeGomez , this is a ping from triage. There hasn't been any activity for some time, perhaps it was forgotten?
@rustbot author
I'll close it because it should likely be a rustc lint directly.