Skip to content

Add support for bound types #55330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 3, 2018
Prev Previous commit
Next Next commit
Fix doc comment
  • Loading branch information
scalexm committed Nov 3, 2018
commit af8196b9d3b2e613c3a550a30445309d5feeb764
2 changes: 1 addition & 1 deletion src/librustc/infer/canonical/canonicalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ impl<'cx, 'gcx, 'tcx> Canonicalizer<'cx, 'gcx, 'tcx> {
let var = self.canonical_var(info, r.into());
let region = ty::ReLateBound(
self.binder_index,
ty::BoundRegion::BrAnon(var.index() as u32)
ty::BoundRegion::BrAnon(var.as_u32())
);
self.tcx().mk_region(region)
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/ty/fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
}

/// Replace all escaping bound vars. The `fld_r` closure replaces escaping
/// bound regions while the `flr_t` closure replaces escaping bound types.
/// bound regions while the `fld_t` closure replaces escaping bound types.
pub fn replace_escaping_bound_vars<T, F, G>(
self,
value: &T,
Expand All @@ -560,7 +560,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
}

/// Replace all types or regions bound by the given `Binder`. The `fld_r`
/// closure replaces bound regions while the `flr_t` closure replaces bound
/// closure replaces bound regions while the `fld_t` closure replaces bound
/// types.
pub fn replace_bound_vars<T, F, G>(
self,
Expand Down