1 error[E0658]: dereferencing raw pointers in constant functions is unstable (see issue #51911)
2 --> $DIR/min_const_fn_unsafe.rs:29:51
4 LL | const unsafe fn foo30_3(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:36: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: call to unsafe function is unsafe and unsafe operations are not allowed in const fn
18 --> $DIR/min_const_fn_unsafe.rs:21:14
20 LL | unsafe { foo4() } //~ ERROR unsafe operations are not allowed in const fn
21 | ^^^^^^ call to unsafe function
23 = note: consult the function's documentation for information on how to avoid undefined behavior
25 error: call to unsafe function is unsafe and unsafe operations are not allowed in const fn
26 --> $DIR/min_const_fn_unsafe.rs:24:14
28 LL | unsafe { foo5::<String>() } //~ ERROR unsafe operations are not allowed in const fn
29 | ^^^^^^^^^^^^^^^^ call to unsafe function
31 = note: consult the function's documentation for information on how to avoid undefined behavior
33 error: call to unsafe function is unsafe and unsafe operations are not allowed in const fn
34 --> $DIR/min_const_fn_unsafe.rs:27:14
36 LL | unsafe { foo6::<Vec<std::cell::Cell<u32>>>() } //~ ERROR not allowed in const fn
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
39 = note: consult the function's documentation for information on how to avoid undefined behavior
41 error: dereference of raw pointer is unsafe and unsafe operations are not allowed in const fn
42 --> $DIR/min_const_fn_unsafe.rs:29:51
44 LL | const unsafe fn foo30_3(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:36: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`.