blob: 7963cbb4e45691b56db9982621b3c33a9b3b4bf6 [file] [log] [blame]
error: `foo` is not yet stable as a const fn
--> $DIR/dont_promote_unstable_const_fn.rs:25:25
|
LL | const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a const fn
| ^^^^^
|
= help: in Nightly builds, add `#![feature(foo)]` to the crate attributes to enable
error[E0597]: borrowed value does not live long enough
--> $DIR/dont_promote_unstable_const_fn.rs:28:28
|
LL | let _: &'static u32 = &foo(); //~ ERROR does not live long enough
| ^^^^^ temporary value does not live long enough
LL | }
| - temporary value only lives until here
|
= note: borrowed value must be valid for the static lifetime...
error[E0597]: borrowed value does not live long enough
--> $DIR/dont_promote_unstable_const_fn.rs:32:28
|
LL | let _: &'static u32 = &meh(); //~ ERROR does not live long enough
| ^^^^^ temporary value does not live long enough
LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();
LL | }
| - temporary value only lives until here
|
= note: borrowed value must be valid for the static lifetime...
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0597`.