@@ -13,7 +13,7 @@ LL | MaybeUninit::<!>::uninit().assume_init();
13
13
error: any use of this value will cause an error
14
14
--> $DIR/assert-type-intrinsics.rs:17:9
15
15
|
16
- LL | const _BAD2: () = unsafe {
16
+ LL | const _BAD2: () = {
17
17
| ---------------
18
18
LL | intrinsics::assert_uninit_valid::<bool>();
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
@@ -24,7 +24,7 @@ LL | intrinsics::assert_uninit_valid::<bool>();
24
24
error: any use of this value will cause an error
25
25
--> $DIR/assert-type-intrinsics.rs:20:9
26
26
|
27
- LL | const _BAD3: () = unsafe {
27
+ LL | const _BAD3: () = {
28
28
| ---------------
29
29
LL | intrinsics::assert_zero_valid::<&'static i32>();
30
30
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
@@ -51,7 +51,7 @@ Future breakage diagnostic:
51
51
error: any use of this value will cause an error
52
52
--> $DIR/assert-type-intrinsics.rs:17:9
53
53
|
54
- LL | const _BAD2: () = unsafe {
54
+ LL | const _BAD2: () = {
55
55
| ---------------
56
56
LL | intrinsics::assert_uninit_valid::<bool>();
57
57
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to leave type `bool` uninitialized, which is invalid
@@ -64,7 +64,7 @@ Future breakage diagnostic:
64
64
error: any use of this value will cause an error
65
65
--> $DIR/assert-type-intrinsics.rs:20:9
66
66
|
67
- LL | const _BAD3: () = unsafe {
67
+ LL | const _BAD3: () = {
68
68
| ---------------
69
69
LL | intrinsics::assert_zero_valid::<&'static i32>();
70
70
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ aborted execution: attempted to zero-initialize type `&i32`, which is invalid
0 commit comments