summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/const-eval-intrinsic-promotion.rs
blob: bdcf537859cc40d08364c1c3d4a2065e7f828315 (plain)
1
2
3
4
5
6
#![feature(core_intrinsics)]
fn main() {
    // Test that calls to intrinsics are never promoted
    let x: &'static usize =
        &std::intrinsics::size_of::<i32>(); //~ ERROR temporary value dropped while borrowed
}