File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
compiler/rustc_mir_build/src/thir/pattern Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1275,14 +1275,13 @@ fn report_non_exhaustive_match<'p, 'tcx>(
12751275 if ty. is_ptr_sized_integral ( ) {
12761276 if ty. inner ( ) == cx. tcx . types . usize {
12771277 err. note ( format ! (
1278- "`{ty}::MAX` is a runtime value and cannot be used for exhaustiveness checking, \
1279- so half-open ranges are necessary to match exhaustively",
1278+ "`{ty}::MAX` is not accessible as a fixed value, so half-open ranges are \
1279+ necessary to match exhaustively",
12801280 ) ) ;
12811281 } else if ty. inner ( ) == cx. tcx . types . isize {
12821282 err. note ( format ! (
1283- "`isize::MIN` and `isize::MAX` are runtime values and cannot \
1284- be used for exhaustiveness checking, so half-open ranges are necessary \
1285- to match exhaustively",
1283+ "The minimum and maximum values of `{ty}` are not directly accessible, so half-open \
1284+ ranges are necessary to match exhaustively",
12861285 ) ) ;
12871286 }
12881287 } else if ty. inner ( ) == cx. tcx . types . str_ {
You can’t perform that action at this time.
0 commit comments