diff options
Diffstat (limited to 'tests/ui/consts/const-eval/const-eval-intrinsic-promotion.rs')
-rw-r--r-- | tests/ui/consts/const-eval/const-eval-intrinsic-promotion.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/consts/const-eval/const-eval-intrinsic-promotion.rs b/tests/ui/consts/const-eval/const-eval-intrinsic-promotion.rs new file mode 100644 index 000000000..bdcf53785 --- /dev/null +++ b/tests/ui/consts/const-eval/const-eval-intrinsic-promotion.rs @@ -0,0 +1,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 +} |