]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / const-extern-fn / const-extern-fn-min-const-fn.stderr
index 146d119fc8f7fcdd43878cbcf5d282133b5ccd18..694e2290808701b84f9ca72231dd88addf238ca4 100644 (file)
@@ -1,30 +1,39 @@
-error[E0723]: function pointers in const fn are unstable
+error[E0658]: function pointers cannot appear in constant functions
   --> $DIR/const-extern-fn-min-const-fn.rs:4:41
    |
 LL | const unsafe extern "C" fn closure() -> fn() { || {} }
    |                                         ^^^^
    |
    = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
 
-error[E0723]: only int, `bool` and `char` operations are stable in const fn
-  --> $DIR/const-extern-fn-min-const-fn.rs:6:38
+error[E0658]: function pointer casts are not allowed in constant functions
+  --> $DIR/const-extern-fn-min-const-fn.rs:4:48
+   |
+LL | const unsafe extern "C" fn closure() -> fn() { || {} }
+   |                                                ^^^^^
+   |
+   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
+   = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
+
+error[E0658]: floating point arithmetic is not allowed in constant functions
+  --> $DIR/const-extern-fn-min-const-fn.rs:7:38
    |
 LL | const unsafe extern fn use_float() { 1.0 + 1.0; }
    |                                      ^^^^^^^^^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #57241 <https://github.com/rust-lang/rust/issues/57241> for more information
+   = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable
 
-error[E0723]: casting pointers to ints is unstable in const fn
-  --> $DIR/const-extern-fn-min-const-fn.rs:8:48
+error[E0658]: casting pointers to integers in constant functions is unstable
+  --> $DIR/const-extern-fn-min-const-fn.rs:9:48
    |
 LL | const extern "C" fn ptr_cast(val: *const u8) { val as usize; }
    |                                                ^^^^^^^^^^^^
    |
-   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
-   = help: add `#![feature(const_fn)]` to the crate attributes to enable
+   = note: see issue #51910 <https://github.com/rust-lang/rust/issues/51910> for more information
+   = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0723`.
+For more information about this error, try `rustc --explain E0658`.