]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
bc6f8c596060fb8612c00fc62c3f1eaf902126b9
[rust.git] / src / test / ui / consts / min_const_fn / min_const_unsafe_fn_libstd_stability.stderr
1 error[E0723]: can only call other `const fn` within a `const fn`, but `const foo` is not stable as `const fn`
2   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:15:41
3    |
4 LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
5    |                                         ^^^^^
6    |
7    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
8    = help: add `#![feature(const_fn)]` to the crate attributes to enable
9
10 error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2` is not stable as `const fn`
11   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:22:42
12    |
13 LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
14    |                                          ^^^^^^
15    |
16    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
17    = help: add `#![feature(const_fn)]` to the crate attributes to enable
18
19 error[E0723]: only int, `bool` and `char` operations are stable in const fn
20   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:26:33
21    |
22 LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 }
23    |                                 ^^^^^^^^^^^^^
24    |
25    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
26    = help: add `#![feature(const_fn)]` to the crate attributes to enable
27
28 error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2_gated` is not stable as `const fn`
29   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:34:48
30    |
31 LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
32    |                                                ^^^^^^^^^^^^
33    |
34    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
35    = help: add `#![feature(const_fn)]` to the crate attributes to enable
36
37 error: aborting due to 4 previous errors
38
39 For more information about this error, try `rustc --explain E0723`.