about summary refs log tree commit diff
path: root/compiler/rustc_lint/messages.ftl
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2023-10-04 16:03:39 +0200
committerUrgau <urgau@numericable.fr>2023-10-04 22:06:16 +0200
commite46236cceb03a5f58cae91b9d8a1b18040443b5c (patch)
tree80c6920fe6bd391b4535abad309aa6b540941fcd /compiler/rustc_lint/messages.ftl
parentdd513e1150569d2c5605bcdd4b2a6741deea3294 (diff)
downloadrust-e46236cceb03a5f58cae91b9d8a1b18040443b5c.tar.gz
rust-e46236cceb03a5f58cae91b9d8a1b18040443b5c.zip
Clarify `invalid_reference_casting` lint around interior mutable types
Diffstat (limited to 'compiler/rustc_lint/messages.ftl')
-rw-r--r--compiler/rustc_lint/messages.ftl2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_lint/messages.ftl b/compiler/rustc_lint/messages.ftl
index 7377c6e2f35..494fb15793a 100644
--- a/compiler/rustc_lint/messages.ftl
+++ b/compiler/rustc_lint/messages.ftl
@@ -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