diff --git a/src/librustc/hir/intravisit.rs b/src/librustc/hir/intravisit.rs index de53262490b..ed86ef70564 100644 --- a/src/librustc/hir/intravisit.rs +++ b/src/librustc/hir/intravisit.rs @@ -511,7 +511,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) { ItemExistential(ExistTy {ref generics, ref bounds, impl_trait_fn}) => { visitor.visit_id(item.id); walk_generics(visitor, generics); - walk_list!(visitor, visit_ty_param_bound, bounds); + walk_list!(visitor, visit_param_bound, bounds); if let Some(impl_trait_fn) = impl_trait_fn { visitor.visit_def_mention(Def::Fn(impl_trait_fn)) } diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 4e9bf8047e9..6291e0eb113 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -1165,7 +1165,7 @@ impl<'a> LoweringContext<'a> { self.allocate_hir_id_counter(exist_ty_node_id, t); let hir_bounds = self.with_hir_id_owner(exist_ty_node_id, |lctx| { - lctx.lower_bounds(bounds, itctx) + lctx.lower_param_bounds(bounds, itctx) }); let (lifetimes, lifetime_defs) = self.lifetimes_from_impl_trait_bounds( diff --git a/src/librustc/hir/print.rs b/src/librustc/hir/print.rs index 229a4da465a..14f780fab7f 100644 --- a/src/librustc/hir/print.rs +++ b/src/librustc/hir/print.rs @@ -662,7 +662,7 @@ impl<'a> State<'a> { self.word_space(":")?; let mut real_bounds = Vec::with_capacity(exist.bounds.len()); for b in exist.bounds.iter() { - if let TraitTyParamBound(ref ptr, hir::TraitBoundModifier::Maybe) = *b { + if let GenericBound::Trait(ref ptr, hir::TraitBoundModifier::Maybe) = *b { self.s.space()?; self.word_space("for ?")?; self.print_trait_ref(&ptr.trait_ref)?;