Don't mutate the inference context when assembling

This commit is contained in:
Masood Malekghassemi 2016-05-11 14:56:52 -07:00
parent 8628ccec8f
commit ec7c483d67

View File

@ -1463,7 +1463,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
return;
}
self.infcx.in_snapshot(|snapshot| {
self.infcx.probe(|snapshot| {
let (self_ty, _) =
self.infcx().skolemize_late_bound_regions(&obligation.self_ty(), snapshot);
let poly_trait_ref = match self_ty.sty {