diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:28 +0000 |
commit | 94a0819fe3a0d679c3042a77bfe6a2afc505daea (patch) | |
tree | 2b827afe6a05f3538db3f7803a88c4587fe85648 /src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.tar.xz rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.zip |
Adding upstream version 1.66.0+dfsg1.upstream/1.66.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs')
-rw-r--r-- | src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs b/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs index 3a3d81176..257df13ef 100644 --- a/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs +++ b/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs @@ -1,10 +1,10 @@ // --force-warn $LINT causes $LINT (which is deny-by-default) to warn // despite $LINT being allowed on command line -// compile-flags: -A const_err --force-warn const_err +// compile-flags: -A mutable_transmutes --force-warn mutable_transmutes // check-pass -const C: i32 = 1 / 0; -//~^ WARN any use of this value will cause an error -//~| WARN this was previously accepted by the compiler - -fn main() {} +fn main() { + unsafe { + let y = std::mem::transmute::<&i32, &mut i32>(&5); //~WARN: undefined behavior + } +} |