rust/tests/ui/consts/const-eval/const-eval-intrinsic-promotion.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
220 B
Rust
Raw Normal View History

#![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
}