Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7af786c

Browse files
authored
Fix conditions lowering text for enums with no fields (rust-lang#2066)
1 parent 4e35ad7 commit 7af786c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/rustc-dev-guide/src/mir/construction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ In [MIR] there is no difference between method calls and function calls anymore.
119119

120120
## Conditions
121121

122-
`if` conditions and `match` statements for `enum`s without variants with fields are
122+
`if` conditions and `match` statements for `enum`s with variants that have no fields are
123123
lowered to `TerminatorKind::SwitchInt`. Each possible value (so `0` and `1` for `if`
124124
conditions) has a corresponding `BasicBlock` to which the code continues.
125125
The argument being branched on is (again) an `Operand` representing the value of

0 commit comments

Comments
 (0)