Skip to content

Commit a3409a1

Browse files
committed
make instantiate_canonical_with_fresh_inference_vars public again
This used to be public, then I made it private in a previous PR, but there really wasn't a strong need for that.
1 parent ca52427 commit a3409a1

File tree

1 file changed

+1
-4
lines changed
  • src/librustc/infer/canonical

1 file changed

+1
-4
lines changed

src/librustc/infer/canonical/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,14 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
241241
/// canonicalized) then represents the values that you computed
242242
/// for each of the canonical inputs to your query.
243243
244-
pub(in infer) fn instantiate_canonical_with_fresh_inference_vars<T>(
244+
pub fn instantiate_canonical_with_fresh_inference_vars<T>(
245245
&self,
246246
span: Span,
247247
canonical: &Canonical<'tcx, T>,
248248
) -> (T, CanonicalVarValues<'tcx>)
249249
where
250250
T: TypeFoldable<'tcx>,
251251
{
252-
assert_eq!(self.universe(), ty::UniverseIndex::ROOT, "infcx not newly created");
253-
assert_eq!(self.type_variables.borrow().num_vars(), 0, "infcx not newly created");
254-
255252
let canonical_inference_vars =
256253
self.fresh_inference_vars_for_canonical_vars(span, canonical.variables);
257254
let result = canonical.substitute(self.tcx, &canonical_inference_vars);

0 commit comments

Comments
 (0)