Navigation Menu

Skip to content

Commit

Permalink
One must always remember to clean up after themselves
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed May 15, 2018
1 parent 5ea91ac commit 5be2bdb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/librustc/infer/mod.rs
Expand Up @@ -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()
}
Expand Down

0 comments on commit 5be2bdb

Please sign in to comment.