Skip to content

Commit e5c1d1c

Browse files
committed
Remove the Option part of range ends in the HIR
1 parent 1f0d057 commit e5c1d1c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

clippy_utils/src/hir_utils.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -1108,14 +1108,9 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
11081108
pub fn hash_ty_pat(&mut self, pat: &TyPat<'_>) {
11091109
std::mem::discriminant(&pat.kind).hash(&mut self.s);
11101110
match pat.kind {
1111-
TyPatKind::Range(s, e, i) => {
1112-
if let Some(s) = s {
1113-
self.hash_const_arg(s);
1114-
}
1115-
if let Some(e) = e {
1116-
self.hash_const_arg(e);
1117-
}
1118-
std::mem::discriminant(&i).hash(&mut self.s);
1111+
TyPatKind::Range(s, e) => {
1112+
self.hash_const_arg(s);
1113+
self.hash_const_arg(e);
11191114
},
11201115
TyPatKind::Err(_) => {},
11211116
}

0 commit comments

Comments
 (0)