1 error[E0658]: dereferencing raw pointers in constant functions is unstable (see issue #51911)
2 --> $DIR/min_const_fn_unsafe.rs:31:59
4 LL | const unsafe fn deref_forbidden(x: *mut usize) -> usize { *x } //~ ERROR not allowed in const fn
7 = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable
9 error[E0658]: unions in const fn are unstable (see issue #51909)
10 --> $DIR/min_const_fn_unsafe.rs:38:5
12 LL | Foo { x: () }.y //~ ERROR not allowed in const fn
15 = help: add #![feature(const_fn_union)] to the crate attributes to enable
17 error[E0658]: calls to `const unsafe fn` in const fns are unstable (see issue #55607)
18 --> $DIR/min_const_fn_unsafe.rs:21:14
20 LL | unsafe { ret_i32_no_unsafe() } //~ ERROR calls to `const unsafe fn` in const fns are unstable
23 = help: add #![feature(min_const_unsafe_fn)] to the crate attributes to enable
25 error[E0658]: calls to `const unsafe fn` in const fns are unstable (see issue #55607)
26 --> $DIR/min_const_fn_unsafe.rs:24:14
28 LL | unsafe { ret_null_ptr_no_unsafe::<String>() }
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 = help: add #![feature(min_const_unsafe_fn)] to the crate attributes to enable
33 error[E0658]: calls to `const unsafe fn` in const fns are unstable (see issue #55607)
34 --> $DIR/min_const_fn_unsafe.rs:28:14
36 LL | unsafe { ret_null_mut_ptr_no_unsafe::<Vec<std::cell::Cell<u32>>>() }
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 = help: add #![feature(min_const_unsafe_fn)] to the crate attributes to enable
41 error: dereference of raw pointer is unsafe and unsafe operations are not allowed in const fn
42 --> $DIR/min_const_fn_unsafe.rs:31:59
44 LL | const unsafe fn deref_forbidden(x: *mut usize) -> usize { *x } //~ ERROR not allowed in const fn
45 | ^^ dereference of raw pointer
47 = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
49 error: access to union field is unsafe and unsafe operations are not allowed in const fn
50 --> $DIR/min_const_fn_unsafe.rs:38:5
52 LL | Foo { x: () }.y //~ ERROR not allowed in const fn
53 | ^^^^^^^^^^^^^^^ access to union field
55 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
57 error: aborting due to 7 previous errors
59 For more information about this error, try `rustc --explain E0658`.