]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / min_const_fn / min_const_unsafe_fn_libstd_stability.stderr
CommitLineData
1b1a35ee 1error: `foo` is not yet stable as a const fn
60c5eb7d 2 --> $DIR/min_const_unsafe_fn_libstd_stability.rs:16:41
0731742a 3 |
532ac7d7 4LL | 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 9error: `foo2` is not yet stable as a const fn
60c5eb7d 10 --> $DIR/min_const_unsafe_fn_libstd_stability.rs:24:42
0731742a 11 |
532ac7d7 12LL | 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 17error: 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 20LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 }
0731742a 21 | ^^^^^^^^^^^^^
9fa01778 22 |
1b1a35ee
XL
23help: if it is not part of the public API, make this function unstably const
24 |
25LL | #[rustc_const_unstable(feature = "...", issue = "...")]
26 |
27help: otherwise `#[allow_internal_unstable]` can be used to bypass stability checks
28 |
29LL | #[allow_internal_unstable(const_fn_floating_point_arithmetic)]
30 |
0731742a 31
1b1a35ee
XL
32error: `foo2_gated` is not yet stable as a const fn
33 --> $DIR/min_const_unsafe_fn_libstd_stability.rs:39:48
0731742a 34 |
532ac7d7 35LL | 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
40error: aborting due to 4 previous errors
41