Skip to content

Commit

Permalink
Reword first sentence to be more specific.
Browse files Browse the repository at this point in the history
Co-authored-by: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com>
  • Loading branch information
mixy1 and obi1kenobi authored Sep 9, 2024
1 parent 2cf703d commit efdf702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/attributes/type_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ match message {
}
```

However, casting non-exhaustive types from foreign crates is generally disallowed, except when dealing with enums that have no non-exhaustive variants.
It's also not allowed to use numeric casts (`as`) on enums that contain any non-exhaustive variants.

For example, the following enum can be cast because it doesn't contain any non-exhaustive variants:
```rust, ignore
Expand Down

0 comments on commit efdf702

Please sign in to comment.