File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -418,9 +418,12 @@ println!("{}", match 0xfacade {
418418});
419419```
420420
421- Range patterns are always refutable, even when they cover the complete set
422- of possible values of a type. For example, ` 0u8..=255u8 ` is refutable even though
423- it covers all possible values of ` u8 ` .
421+ Range patterns for (non-` usize ` and -` isize ` ) integer and ` char ` types are irrefutable
422+ when they span the entire set of possible values of a type. For example, ` 0u8..=255u8 `
423+ is irrefutable. The range of values for an integer type is the closed range from its
424+ minimum to maximum value. The range of values for a ` char ` type are precisely those
425+ ranges containing all Unicode Scalar Values: ` '\u{0000}'..='\u{D7FF}' ` and
426+ ` '\u{E000}'..='\u{10FFFF}' ` .
424427
425428## Reference patterns
426429
You can’t perform that action at this time.
0 commit comments