Skip to content

Commit 6ecf95c

Browse files
authored
Merge pull request #445 from Nadrieril/Nadrieril-patch-1
Stabilize `min_exhaustive_patterns`
2 parents 9f871ce + d5ba0cb commit 6ecf95c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/exotic-sizes.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ because the `Err` case doesn't actually exist (strictly speaking, this is only
137137
an optimization that is not guaranteed, so for example transmuting one into the
138138
other is still Undefined Behavior).
139139

140-
The following *could* also compile:
140+
The following also compiles:
141141

142-
```rust,compile_fail
142+
```rust
143143
enum Void {}
144144

145145
let res: Result<u32, Void> = Ok(0);
@@ -148,8 +148,6 @@ let res: Result<u32, Void> = Ok(0);
148148
let Ok(num) = res;
149149
```
150150

151-
But this trick doesn't work yet.
152-
153151
One final subtle detail about empty types is that raw pointers to them are
154152
actually valid to construct, but dereferencing them is Undefined Behavior
155153
because that wouldn't make sense.

0 commit comments

Comments
 (0)