diff options
| author | David Wood <david.wood@huawei.com> | 2022-06-28 13:45:49 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-06-30 08:59:22 +0100 |
| commit | d071f504f80767b1686b176b72fdcf87a35f8dca (patch) | |
| tree | 94ad62983f07a631a99b8162abb14e2e86b3f187 /compiler/rustc_error_messages | |
| parent | dbdbdb68740dd3be9cea059dd5cb6067c45f38d7 (diff) | |
| download | rust-d071f504f80767b1686b176b72fdcf87a35f8dca.tar.gz rust-d071f504f80767b1686b176b72fdcf87a35f8dca.zip | |
lint: port mutable transmutes diagnostic
Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_error_messages')
| -rw-r--r-- | compiler/rustc_error_messages/locales/en-US/lint.ftl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_error_messages/locales/en-US/lint.ftl b/compiler/rustc_error_messages/locales/en-US/lint.ftl index cbe7e15a723..de2d21ff355 100644 --- a/compiler/rustc_error_messages/locales/en-US/lint.ftl +++ b/compiler/rustc_error_messages/locales/en-US/lint.ftl @@ -349,3 +349,6 @@ lint-builtin-no-mangle-generic = functions generic over types or consts must be lint-builtin-const-no-mangle = const items should never be `#[no_mangle]` .suggestion = try a static value + +lint-builtin-mutable-transmutes = + transmuting &T to &mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell |
