]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / consts / const-eval / dont_promote_unstable_const_fn_cross_crate.rs
1 // aux-build:stability.rs
2
3 extern crate stability;
4
5 use stability::foo;
6
7 fn main() {
8     let _: &'static u32 = &foo(); //~ ERROR temporary value dropped while borrowed
9     let _x: &'static u32 = &foo(); //~ ERROR temporary value dropped while borrowed
10 }