1
Fork 0

Remove Ty: Copy bound

This commit is contained in:
Nadrieril 2023-12-23 00:21:27 +01:00
parent 227abacaef
commit 796cdc590c
6 changed files with 32 additions and 31 deletions

View file

@ -1130,7 +1130,7 @@ fn collect_non_exhaustive_tys<'tcx>(
non_exhaustive_tys.insert(pat.ty().inner());
}
if let Constructor::IntRange(range) = pat.ctor() {
if cx.is_range_beyond_boundaries(range, pat.ty()) {
if cx.is_range_beyond_boundaries(range, *pat.ty()) {
// The range denotes the values before `isize::MIN` or the values after `usize::MAX`/`isize::MAX`.
non_exhaustive_tys.insert(pat.ty().inner());
}