Address review comments.
This commit is contained in:
parent
03b8091d10
commit
45deab4a2c
@ -513,7 +513,9 @@ impl<'a, 'gcx, 'tcx, W> TypeVisitor<'tcx> for TypeIdHasher<'a, 'gcx, 'tcx, W>
|
||||
match *r {
|
||||
ty::ReErased |
|
||||
ty::ReStatic |
|
||||
ty::ReEmpty => {}
|
||||
ty::ReEmpty => {
|
||||
// No variant fields to hash for these ...
|
||||
}
|
||||
ty::ReLateBound(db, ty::BrAnon(i)) => {
|
||||
self.hash(db.depth);
|
||||
self.hash(i);
|
||||
|
@ -45,8 +45,17 @@ impl<'a, 'tcx> MutVisitor<'tcx> for EraseRegionsVisitor<'a, 'tcx> {
|
||||
Rvalue::Ref(ref mut r, _, _) => {
|
||||
*r = self.tcx.mk_region(ReErased);
|
||||
}
|
||||
_ => {
|
||||
/* only the above variant contains regions */
|
||||
Rvalue::Use(..) |
|
||||
Rvalue::Repeat(..) |
|
||||
Rvalue::Len(..) |
|
||||
Rvalue::Cast(..) |
|
||||
Rvalue::BinaryOp(..) |
|
||||
Rvalue::CheckedBinaryOp(..) |
|
||||
Rvalue::UnaryOp(..) |
|
||||
Rvalue::Discriminant(..) |
|
||||
Rvalue::Box(..) |
|
||||
Rvalue::Aggregate(..) => {
|
||||
// These variants don't contain regions.
|
||||
}
|
||||
}
|
||||
self.super_rvalue(rvalue, location);
|
||||
|
Loading…
Reference in New Issue
Block a user