|
1 |
| -error: the type `!` does not permit zero-initialization |
2 |
| - --> $DIR/uninitialized-zeroed.rs:15:23 |
| 1 | +error: the type `&'static T` does not permit zero-initialization |
| 2 | + --> $DIR/uninitialized-zeroed.rs:20:32 |
3 | 3 | |
|
4 |
| -LL | let _val: ! = mem::zeroed(); |
5 |
| - | ^^^^^^^^^^^^^ |
| 4 | +LL | let _val: &'static T = mem::zeroed(); |
| 5 | + | ^^^^^^^^^^^^^ |
6 | 6 | |
|
7 | 7 | note: lint level defined here
|
8 | 8 | --> $DIR/uninitialized-zeroed.rs:7:9
|
9 | 9 | |
|
10 | 10 | LL | #![deny(invalid_value)]
|
11 | 11 | | ^^^^^^^^^^^^^
|
| 12 | + = note: this means that this code causes undefined behavior when executed |
| 13 | + = help: use `MaybeUninit` instead |
| 14 | + |
| 15 | +error: the type `&'static T` does not permit being left uninitialized |
| 16 | + --> $DIR/uninitialized-zeroed.rs:21:32 |
| 17 | + | |
| 18 | +LL | let _val: &'static T = mem::uninitialized(); |
| 19 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 20 | + | |
| 21 | + = note: this means that this code causes undefined behavior when executed |
| 22 | + = help: use `MaybeUninit` instead |
| 23 | + |
| 24 | +error: the type `Wrap<&'static T>` does not permit zero-initialization |
| 25 | + --> $DIR/uninitialized-zeroed.rs:23:38 |
| 26 | + | |
| 27 | +LL | let _val: Wrap<&'static T> = mem::zeroed(); |
| 28 | + | ^^^^^^^^^^^^^ |
| 29 | + | |
| 30 | + = note: this means that this code causes undefined behavior when executed |
| 31 | + = help: use `MaybeUninit` instead |
| 32 | + |
| 33 | +error: the type `Wrap<&'static T>` does not permit being left uninitialized |
| 34 | + --> $DIR/uninitialized-zeroed.rs:24:38 |
| 35 | + | |
| 36 | +LL | let _val: Wrap<&'static T> = mem::uninitialized(); |
| 37 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 38 | + | |
| 39 | + = note: this means that this code causes undefined behavior when executed |
| 40 | + = help: use `MaybeUninit` instead |
| 41 | + |
| 42 | +error: the type `!` does not permit zero-initialization |
| 43 | + --> $DIR/uninitialized-zeroed.rs:30:23 |
| 44 | + | |
| 45 | +LL | let _val: ! = mem::zeroed(); |
| 46 | + | ^^^^^^^^^^^^^ |
| 47 | + | |
| 48 | + = note: this means that this code causes undefined behavior when executed |
| 49 | + = help: use `MaybeUninit` instead |
12 | 50 |
|
13 | 51 | error: the type `!` does not permit being left uninitialized
|
14 |
| - --> $DIR/uninitialized-zeroed.rs:16:23 |
| 52 | + --> $DIR/uninitialized-zeroed.rs:31:23 |
15 | 53 | |
|
16 | 54 | LL | let _val: ! = mem::uninitialized();
|
17 | 55 | | ^^^^^^^^^^^^^^^^^^^^
|
| 56 | + | |
| 57 | + = note: this means that this code causes undefined behavior when executed |
| 58 | + = help: use `MaybeUninit` instead |
| 59 | + |
| 60 | +error: the type `(i32, !)` does not permit zero-initialization |
| 61 | + --> $DIR/uninitialized-zeroed.rs:33:30 |
| 62 | + | |
| 63 | +LL | let _val: (i32, !) = mem::zeroed(); |
| 64 | + | ^^^^^^^^^^^^^ |
| 65 | + | |
| 66 | + = note: this means that this code causes undefined behavior when executed |
| 67 | + = help: use `MaybeUninit` instead |
| 68 | + |
| 69 | +error: the type `(i32, !)` does not permit being left uninitialized |
| 70 | + --> $DIR/uninitialized-zeroed.rs:34:30 |
| 71 | + | |
| 72 | +LL | let _val: (i32, !) = mem::uninitialized(); |
| 73 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 74 | + | |
| 75 | + = note: this means that this code causes undefined behavior when executed |
| 76 | + = help: use `MaybeUninit` instead |
| 77 | + |
| 78 | +error: the type `Void` does not permit zero-initialization |
| 79 | + --> $DIR/uninitialized-zeroed.rs:36:26 |
| 80 | + | |
| 81 | +LL | let _val: Void = mem::zeroed(); |
| 82 | + | ^^^^^^^^^^^^^ |
| 83 | + | |
| 84 | + = note: this means that this code causes undefined behavior when executed |
| 85 | + = help: use `MaybeUninit` instead |
| 86 | + |
| 87 | +error: the type `Void` does not permit being left uninitialized |
| 88 | + --> $DIR/uninitialized-zeroed.rs:37:26 |
| 89 | + | |
| 90 | +LL | let _val: Void = mem::uninitialized(); |
| 91 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 92 | + | |
| 93 | + = note: this means that this code causes undefined behavior when executed |
| 94 | + = help: use `MaybeUninit` instead |
18 | 95 |
|
19 | 96 | error: the type `&'static i32` does not permit zero-initialization
|
20 |
| - --> $DIR/uninitialized-zeroed.rs:21:34 |
| 97 | + --> $DIR/uninitialized-zeroed.rs:39:34 |
21 | 98 | |
|
22 | 99 | LL | let _val: &'static i32 = mem::zeroed();
|
23 | 100 | | ^^^^^^^^^^^^^
|
| 101 | + | |
| 102 | + = note: this means that this code causes undefined behavior when executed |
| 103 | + = help: use `MaybeUninit` instead |
24 | 104 |
|
25 | 105 | error: the type `&'static i32` does not permit being left uninitialized
|
26 |
| - --> $DIR/uninitialized-zeroed.rs:22:34 |
| 106 | + --> $DIR/uninitialized-zeroed.rs:40:34 |
27 | 107 | |
|
28 | 108 | LL | let _val: &'static i32 = mem::uninitialized();
|
29 | 109 | | ^^^^^^^^^^^^^^^^^^^^
|
| 110 | + | |
| 111 | + = note: this means that this code causes undefined behavior when executed |
| 112 | + = help: use `MaybeUninit` instead |
| 113 | + |
| 114 | +error: the type `Ref` does not permit zero-initialization |
| 115 | + --> $DIR/uninitialized-zeroed.rs:42:25 |
| 116 | + | |
| 117 | +LL | let _val: Ref = mem::zeroed(); |
| 118 | + | ^^^^^^^^^^^^^ |
| 119 | + | |
| 120 | + = note: this means that this code causes undefined behavior when executed |
| 121 | + = help: use `MaybeUninit` instead |
| 122 | + |
| 123 | +error: the type `Ref` does not permit being left uninitialized |
| 124 | + --> $DIR/uninitialized-zeroed.rs:43:25 |
| 125 | + | |
| 126 | +LL | let _val: Ref = mem::uninitialized(); |
| 127 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 128 | + | |
| 129 | + = note: this means that this code causes undefined behavior when executed |
| 130 | + = help: use `MaybeUninit` instead |
30 | 131 |
|
31 | 132 | error: the type `fn()` does not permit zero-initialization
|
32 |
| - --> $DIR/uninitialized-zeroed.rs:24:26 |
| 133 | + --> $DIR/uninitialized-zeroed.rs:45:26 |
33 | 134 | |
|
34 | 135 | LL | let _val: fn() = mem::zeroed();
|
35 | 136 | | ^^^^^^^^^^^^^
|
| 137 | + | |
| 138 | + = note: this means that this code causes undefined behavior when executed |
| 139 | + = help: use `MaybeUninit` instead |
36 | 140 |
|
37 | 141 | error: the type `fn()` does not permit being left uninitialized
|
38 |
| - --> $DIR/uninitialized-zeroed.rs:25:26 |
| 142 | + --> $DIR/uninitialized-zeroed.rs:46:26 |
39 | 143 | |
|
40 | 144 | LL | let _val: fn() = mem::uninitialized();
|
41 | 145 | | ^^^^^^^^^^^^^^^^^^^^
|
| 146 | + | |
| 147 | + = note: this means that this code causes undefined behavior when executed |
| 148 | + = help: use `MaybeUninit` instead |
| 149 | + |
| 150 | +error: the type `Wrap<fn()>` does not permit zero-initialization |
| 151 | + --> $DIR/uninitialized-zeroed.rs:48:32 |
| 152 | + | |
| 153 | +LL | let _val: Wrap<fn()> = mem::zeroed(); |
| 154 | + | ^^^^^^^^^^^^^ |
| 155 | + | |
| 156 | + = note: this means that this code causes undefined behavior when executed |
| 157 | + = help: use `MaybeUninit` instead |
| 158 | + |
| 159 | +error: the type `Wrap<fn()>` does not permit being left uninitialized |
| 160 | + --> $DIR/uninitialized-zeroed.rs:49:32 |
| 161 | + | |
| 162 | +LL | let _val: Wrap<fn()> = mem::uninitialized(); |
| 163 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 164 | + | |
| 165 | + = note: this means that this code causes undefined behavior when executed |
| 166 | + = help: use `MaybeUninit` instead |
42 | 167 |
|
43 |
| -error: aborting due to 6 previous errors |
| 168 | +error: aborting due to 18 previous errors |
44 | 169 |
|
0 commit comments