You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/rustc_lint/messages.ftl
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -319,6 +319,10 @@ lint_invalid_reference_casting_assign_to_ref = assigning to `&T` is undefined be
319
319
lint_invalid_reference_casting_borrow_as_mut = casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
320
320
.label = casting happend here
321
321
322
+
lint_invalid_reference_casting_bigger_layout = casting references to a bigger memory layout is undefined behavior, even if the reference is unused
323
+
.label = casting happend here
324
+
.layout = casting from `{$from_ty}` (size: {$from_size} bytes, align: {$from_align} bytes) to `{$to_ty}` (size: {$to_size} bytes, align: {$to_align} bytes)
325
+
322
326
lint_invalid_reference_casting_note_book = for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
323
327
324
328
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`
0 commit comments