Skip to content

Commit

Permalink
Clarify a comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Feb 20, 2025
1 parent 0519a58 commit 2edaf68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/mir/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2edaf68

Please sign in to comment.