1 error: `foo` is not yet stable as a const fn
2 --> $DIR/dont_promote_unstable_const_fn.rs:15:25
4 LL | const fn bar() -> u32 { foo() }
7 = help: add `#![feature(foo)]` to the crate attributes to enable
9 error[E0716]: temporary value dropped while borrowed
10 --> $DIR/dont_promote_unstable_const_fn.rs:18:28
12 LL | let _: &'static u32 = &foo();
13 | ------------ ^^^^^ creates a temporary which is freed while still in use
15 | type annotation requires that borrow lasts for `'static`
17 | - temporary value is freed at the end of this statement
19 error[E0716]: temporary value dropped while borrowed
20 --> $DIR/dont_promote_unstable_const_fn.rs:22:28
22 LL | let _: &'static u32 = &meh();
23 | ------------ ^^^^^ creates a temporary which is freed while still in use
25 | type annotation requires that borrow lasts for `'static`
28 | - temporary value is freed at the end of this statement
30 error[E0716]: temporary value dropped while borrowed
31 --> $DIR/dont_promote_unstable_const_fn.rs:23:26
33 LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();
34 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
36 | type annotation requires that borrow lasts for `'static`
39 | - temporary value is freed at the end of this statement
41 error: aborting due to 4 previous errors
43 For more information about this error, try `rustc --explain E0716`.