2021-08-18 04:05:59 -05:00
|
|
|
// --force-warn $LINT causes $LINT (which is deny-by-default) to warn
|
2022-09-21 06:05:20 -05:00
|
|
|
// compile-flags: --force-warn mutable_transmutes
|
2021-06-02 10:25:24 -05:00
|
|
|
// check-pass
|
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let y = std::mem::transmute::<&i32, &mut i32>(&5); //~WARN: undefined behavior
|
|
|
|
}
|
|
|
|
}
|