Extend useless_ptr_null_checks to more functions #114442
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Filing an issue as #113657 has been merged and we now warn on a bunch of functions/casts that return raw pointers that will never be null. The standard library contains a larger set than the specified one though, as pointed out in this comment on the PR.
I think it would be good idea to add a
#[rustc_return_non_null_ptr]
attribute, and add it to the functions mentioned in the comment, then make theuseless_ptr_null_checks
lint check for that attribute.cc @Urgau
The text was updated successfully, but these errors were encountered: