Skip to content

Commit 5d55459

Browse files
committed
Beta branch does not have const fn subsec_millis yet
1 parent 59ffbac commit 5d55459

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

src/test/ui/const-eval/dont_promote_unstable_const_fn.nll.stderr

+1-12
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,5 @@ LL | const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a cons
66
|
77
= help: in Nightly builds, add `#![feature(foo)]` to the crate attributes to enable
88

9-
error[E0597]: borrowed value does not live long enough
10-
--> $DIR/dont_promote_unstable_const_fn.rs:33:26
11-
|
12-
LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
14-
LL | }
15-
| - temporary value only lives until here
16-
|
17-
= note: borrowed value must be valid for the static lifetime...
18-
19-
error: aborting due to 2 previous errors
9+
error: aborting due to previous error
2010

21-
For more information about this error, try `rustc --explain E0597`.

src/test/ui/const-eval/dont_promote_unstable_const_fn.rs

-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ fn a() {
3030

3131
fn main() {
3232
let _: &'static u32 = &meh(); //~ ERROR does not live long enough
33-
let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();
3433
}

src/test/ui/const-eval/dont_promote_unstable_const_fn.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ error[E0597]: borrowed value does not live long enough
2121
|
2222
LL | let _: &'static u32 = &meh(); //~ ERROR does not live long enough
2323
| ^^^^^ temporary value does not live long enough
24-
LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();
2524
LL | }
2625
| - temporary value only lives until here
2726
|

0 commit comments

Comments
 (0)