1 error: `foo` is not yet stable as a const fn
2 --> $DIR/dont_promote_unstable_const_fn.rs:25:25
4 LL | const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a const fn
7 = help: add `#![feature(foo)]` to the crate attributes to enable
9 error[E0597]: borrowed value does not live long enough
10 --> $DIR/dont_promote_unstable_const_fn.rs:28:28
12 LL | let _: &'static u32 = &foo(); //~ ERROR does not live long enough
13 | ^^^^^ temporary value does not live long enough
15 | - temporary value only lives until here
17 = note: borrowed value must be valid for the static lifetime...
19 error[E0597]: borrowed value does not live long enough
20 --> $DIR/dont_promote_unstable_const_fn.rs:32:28
22 LL | let _: &'static u32 = &meh(); //~ ERROR does not live long enough
23 | ^^^^^ temporary value does not live long enough
26 | - temporary value only lives until here
28 = note: borrowed value must be valid for the static lifetime...
30 error[E0597]: borrowed value does not live long enough
31 --> $DIR/dont_promote_unstable_const_fn.rs:33:26
33 LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();
34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
35 LL | //~^ ERROR does not live long enough
37 | - temporary value only lives until here
39 = note: borrowed value must be valid for the static lifetime...
41 error: aborting due to 4 previous errors
43 For more information about this error, try `rustc --explain E0597`.