One must always remember to clean up after themselves

This commit is contained in:
varkor 2018-05-15 14:52:53 +01:00
parent 5ea91ac531
commit 5be2bdb498

View File

@ -924,11 +924,12 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
// used in a path such as `Foo::<T, U>::new()` will
// use an inference variable for `C` with `[T, U]`
// as the substitutions for the default, `(T, U)`.
let ty_var_id = self.type_variables
.borrow_mut()
.new_var(self.universe(),
false,
TypeVariableOrigin::TypeParameterDefinition(span, param.name));
let ty_var_id =
self.type_variables
.borrow_mut()
.new_var(self.universe(),
false,
TypeVariableOrigin::TypeParameterDefinition(span, param.name));
self.tcx.mk_var(ty_var_id).into()
}