fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.7 KiB39 linesraw
1error[E0723]: unsizing casts are not allowed in const fn
2  --> $DIR/const-extern-fn-min-const-fn.rs:3:48
3   |
4LL | const extern fn unsize(x: &[u8; 3]) -> &[u8] { x }
5   |                                                ^
6   |
7   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
8   = help: add `#![feature(const_fn)]` to the crate attributes to enable
9
10error[E0723]: function pointers in const fn are unstable
11  --> $DIR/const-extern-fn-min-const-fn.rs:5:41
12   |
13LL | const unsafe extern "C" fn closure() -> fn() { || {} }
14   |                                         ^^^^
15   |
16   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
17   = help: add `#![feature(const_fn)]` to the crate attributes to enable
18
19error[E0723]: only int, `bool` and `char` operations are stable in const fn
20  --> $DIR/const-extern-fn-min-const-fn.rs:7:38
21   |
22LL | const unsafe extern fn use_float() { 1.0 + 1.0; }
23   |                                      ^^^^^^^^^
24   |
25   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
26   = help: add `#![feature(const_fn)]` to the crate attributes to enable
27
28error[E0723]: casting pointers to ints is unstable in const fn
29  --> $DIR/const-extern-fn-min-const-fn.rs:9:48
30   |
31LL | const extern "C" fn ptr_cast(val: *const u8) { val as usize; }
32   |                                                ^^^^^^^^^^^^
33   |
34   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
35   = help: add `#![feature(const_fn)]` to the crate attributes to enable
36
37error: aborting due to 4 previous errors
38
39For more information about this error, try `rustc --explain E0723`.