summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/force-warn/deny-by-default-lint.rs
blob: c2e9377e90854d9af8c0081762497476c1ea8dcf (plain)
1
2
3
4
5
6
7
8
9
// --force-warn $LINT causes $LINT (which is deny-by-default) to warn
// compile-flags: --force-warn mutable_transmutes
// check-pass

fn main() {
    unsafe {
        let y = std::mem::transmute::<&i32, &mut i32>(&5); //~WARN: undefined behavior
    }
}