error[E0723]: unsizing casts are not allowed in const fn
  --> $DIR/cast_errors.rs:3:41
   |
LL | const fn unsize(x: &[u8; 3]) -> &[u8] { x }
   |                                         ^
   |
   = 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

error[E0723]: function pointers in const fn are unstable
  --> $DIR/cast_errors.rs:5:23
   |
LL | const 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

error[E0723]: function pointers in const fn are unstable
  --> $DIR/cast_errors.rs:8:5
   |
LL |     (|| {}) as 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

error[E0723]: function pointers in const fn are unstable
  --> $DIR/cast_errors.rs:11:28
   |
LL | const fn reify(f: fn()) -> unsafe fn() { f }
   |                            ^^^^^^^^^^^
   |
   = 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

error[E0723]: function pointers in const fn are unstable
  --> $DIR/cast_errors.rs:13:21
   |
LL | const fn reify2() { main as unsafe 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

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0723`.
