1
Fork 0

Clarify invalid_reference_casting lint around interior mutable types

This commit is contained in:
Urgau 2023-10-04 16:03:39 +02:00
parent dd513e1150
commit e46236cceb
5 changed files with 68 additions and 32 deletions

View file

@ -319,6 +319,8 @@ lint_invalid_reference_casting_borrow_as_mut = casting `&T` to `&mut T` is undef
lint_invalid_reference_casting_note_book = for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
lint_invalid_reference_casting_note_ty_has_interior_mutability = even for types with interior mutability, the only legal way to obtain a mutable pointer from a shared reference is through `UnsafeCell::get`
lint_lintpass_by_hand = implementing `LintPass` by hand
.help = try using `declare_lint_pass!` or `impl_lint_pass!` instead