summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/force-warn/allowed-deny-by-default-lint.rs
blob: 0d4b468c2b337eeceb2a43fee65074b7a5809d93 (plain)
1
2
3
4
5
6
7
8
9
10
11
// --force-warn $LINT causes $LINT (which is deny-by-default) to warn
// despite $LINT being allowed in module
// compile-flags: --force-warn mutable_transmutes
// check-pass

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