]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error: `foo` is not yet stable as a const fn |
60c5eb7d | 2 | --> $DIR/min_const_unsafe_fn_libstd_stability.rs:16:41 |
0731742a | 3 | | |
532ac7d7 | 4 | LL | const unsafe fn bar() -> u32 { unsafe { foo() } } |
0731742a | 5 | | ^^^^^ |
9fa01778 | 6 | | |
1b1a35ee | 7 | = help: Const-stable functions can only call other const-stable functions |
0731742a | 8 | |
1b1a35ee | 9 | error: `foo2` is not yet stable as a const fn |
60c5eb7d | 10 | --> $DIR/min_const_unsafe_fn_libstd_stability.rs:24:42 |
0731742a | 11 | | |
532ac7d7 | 12 | LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } } |
0731742a | 13 | | ^^^^^^ |
9fa01778 | 14 | | |
1b1a35ee | 15 | = help: Const-stable functions can only call other const-stable functions |
0731742a | 16 | |
1b1a35ee | 17 | error: const-stable function cannot use `#[feature(const_fn_floating_point_arithmetic)]` |
60c5eb7d | 18 | --> $DIR/min_const_unsafe_fn_libstd_stability.rs:29:33 |
0731742a | 19 | | |
532ac7d7 | 20 | LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 } |
0731742a | 21 | | ^^^^^^^^^^^^^ |
9fa01778 | 22 | | |
1b1a35ee XL |
23 | help: if it is not part of the public API, make this function unstably const |
24 | | | |
25 | LL | #[rustc_const_unstable(feature = "...", issue = "...")] | |
26 | | | |
27 | help: otherwise `#[allow_internal_unstable]` can be used to bypass stability checks | |
28 | | | |
29 | LL | #[allow_internal_unstable(const_fn_floating_point_arithmetic)] | |
30 | | | |
0731742a | 31 | |
1b1a35ee XL |
32 | error: `foo2_gated` is not yet stable as a const fn |
33 | --> $DIR/min_const_unsafe_fn_libstd_stability.rs:39:48 | |
0731742a | 34 | | |
532ac7d7 | 35 | LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } } |
0731742a | 36 | | ^^^^^^^^^^^^ |
9fa01778 | 37 | | |
1b1a35ee | 38 | = help: Const-stable functions can only call other const-stable functions |
0731742a XL |
39 | |
40 | error: aborting due to 4 previous errors | |
41 |