]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[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 }