Closed
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