bodge
This commit is contained in:
parent
a5d2db4a58
commit
f865e3d22f
3 changed files with 44 additions and 9 deletions
|
@ -538,9 +538,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
}
|
||||
self.visit_fn_ret_ty(&f.decl.output)
|
||||
}
|
||||
TyKind::ImplTrait(_, ref bounds) => {
|
||||
self.with_hir_id_owner(None, |this| {
|
||||
walk_list!(this, visit_param_bound, bounds);
|
||||
TyKind::ImplTrait(def_node_id, _) => {
|
||||
self.lctx.allocate_hir_id_counter(def_node_id);
|
||||
self.with_hir_id_owner(Some(def_node_id), |this| {
|
||||
visit::walk_ty(this, t);
|
||||
});
|
||||
}
|
||||
_ => visit::walk_ty(self, t),
|
||||
|
@ -1351,10 +1352,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
// Add a definition for the in-band `Param`.
|
||||
let def_id = self.resolver.local_def_id(def_node_id);
|
||||
|
||||
let hir_bounds = self.lower_param_bounds(
|
||||
bounds,
|
||||
ImplTraitContext::Universal(in_band_ty_params),
|
||||
);
|
||||
self.allocate_hir_id_counter(def_node_id);
|
||||
|
||||
let hir_bounds = self.with_hir_id_owner(def_node_id, |this| {
|
||||
this.lower_param_bounds(
|
||||
bounds,
|
||||
ImplTraitContext::Universal(in_band_ty_params),
|
||||
)
|
||||
});
|
||||
// Set the name to `impl Bound1 + Bound2`.
|
||||
let ident = Ident::from_str_and_span(&pprust::ty_to_string(t), span);
|
||||
in_band_ty_params.push(hir::GenericParam {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue