as_ref suggestions should warn about UB concerns #61786
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
With #61444 we are now suggesting people to use
as_ref
when they have a raw pointer and need a reference. With #61785as_ref
gets some expanded documentation on UB avoidance. It might be a good idea to mention that also in the actual suggestion, so people don't have to open the docs to be aware of this.Cc @estebank
The text was updated successfully, but these errors were encountered: