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