Rollup merge of #106622 - estebank:issue-68972, r=davidtwco
Detect out of bounds range pattern value Fix #68972.
This commit is contained in:
commit
88765b0f59
5 changed files with 115 additions and 6 deletions
|
@ -206,6 +206,10 @@ mir_build_lower_range_bound_must_be_less_than_or_equal_to_upper =
|
|||
.label = lower bound larger than upper bound
|
||||
.teach_note = When matching against a range, the compiler verifies that the range is non-empty. Range patterns include both end-points, so this is equivalent to requiring the start of the range to be less than or equal to the end of the range.
|
||||
|
||||
mir_build_literal_in_range_out_of_bounds =
|
||||
literal out of range for `{$ty}`
|
||||
.label = this value doesn't fit in `{$ty}` whose maximum value is `{$max}`
|
||||
|
||||
mir_build_lower_range_bound_must_be_less_than_upper = lower range bound must be less than upper
|
||||
|
||||
mir_build_leading_irrefutable_let_patterns = leading irrefutable {$count ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue