-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
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 the useless_ptr_null_checks
lint check for that attribute.
cc @Urgau
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.