]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/lint/force-warn/deny-by-default-lint.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / lint / force-warn / deny-by-default-lint.rs
index e371029032fe906be94f93a95ee88634a13003c9..c2e9377e90854d9af8c0081762497476c1ea8dcf 100644 (file)
@@ -1,9 +1,9 @@
 // --force-warn $LINT causes $LINT (which is deny-by-default) to warn
-// compile-flags: --force-warn const_err
+// compile-flags: --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
+    }
+}