diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-19 10:35:06 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-21 07:12:13 +1100 |
| commit | 2edaf684da10792f9e0fa97b8cccff3c270f7402 (patch) | |
| tree | e0ec2fc903e0b9b66b3aa952a0f6763a14d467ab | |
| parent | 0519a58f7a461e0d2f7342de421ce1176f7bfd8d (diff) | |
| download | rust-2edaf684da10792f9e0fa97b8cccff3c270f7402.tar.gz rust-2edaf684da10792f9e0fa97b8cccff3c270f7402.zip | |
Clarify a comment.
| -rw-r--r-- | compiler/rustc_middle/src/mir/terminator.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/terminator.rs b/compiler/rustc_middle/src/mir/terminator.rs index 9357e19f7c5..49e0f619b1e 100644 --- a/compiler/rustc_middle/src/mir/terminator.rs +++ b/compiler/rustc_middle/src/mir/terminator.rs @@ -86,7 +86,7 @@ impl SwitchTargets { self.iter().find_map(|(v, t)| (v == value).then_some(t)).unwrap_or_else(|| self.otherwise()) } - /// Adds a new target to the switch. But You cannot add an already present value. + /// Adds a new target to the switch. Panics if you add an already present value. #[inline] pub fn add_target(&mut self, value: u128, bb: BasicBlock) { let value = Pu128(value); |
