Fix rebase issues with existential types

This commit is contained in:
varkor 2018-06-20 12:34:39 +01:00
parent 21136b8ab4
commit daf7e359a1
3 changed files with 3 additions and 3 deletions

View File

@ -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))
}

View File

@ -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(

View File

@ -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)?;