@@ -323,6 +323,7 @@ impl<'a> LoweringContext<'a> {
323323 | ItemKind :: Union ( _, ref generics)
324324 | ItemKind :: Enum ( _, ref generics)
325325 | ItemKind :: Ty ( _, ref generics)
326+ | ItemKind :: Existential ( _, ref generics)
326327 | ItemKind :: Trait ( _, _, ref generics, ..) => {
327328 let def_id = self . lctx . resolver . definitions ( ) . local_def_id ( item. id ) ;
328329 let count = generics
@@ -2632,6 +2633,11 @@ impl<'a> LoweringContext<'a> {
26322633 self . lower_ty ( t, ImplTraitContext :: Disallowed ) ,
26332634 self . lower_generics ( generics, ImplTraitContext :: Disallowed ) ,
26342635 ) ,
2636+ ItemKind :: Existential ( ref b, ref generics) => hir:: ItemKind :: Existential ( hir:: ExistTy {
2637+ generics : self . lower_generics ( generics, ImplTraitContext :: Disallowed ) ,
2638+ bounds : self . lower_param_bounds ( b, ImplTraitContext :: Disallowed ) ,
2639+ impl_trait_fn : None ,
2640+ } ) ,
26352641 ItemKind :: Enum ( ref enum_definition, ref generics) => hir:: ItemKind :: Enum (
26362642 hir:: EnumDef {
26372643 variants : enum_definition
@@ -3037,6 +3043,12 @@ impl<'a> LoweringContext<'a> {
30373043 self . lower_generics ( & i. generics , ImplTraitContext :: Disallowed ) ,
30383044 hir:: ImplItemKind :: Type ( self . lower_ty ( ty, ImplTraitContext :: Disallowed ) ) ,
30393045 ) ,
3046+ ImplItemKind :: Existential ( ref bounds) => (
3047+ self . lower_generics ( & i. generics , ImplTraitContext :: Disallowed ) ,
3048+ hir:: ImplItemKind :: Existential (
3049+ self . lower_param_bounds ( bounds, ImplTraitContext :: Disallowed ) ,
3050+ ) ,
3051+ ) ,
30403052 ImplItemKind :: Macro ( ..) => panic ! ( "Shouldn't exist any more" ) ,
30413053 } ;
30423054
@@ -3065,6 +3077,7 @@ impl<'a> LoweringContext<'a> {
30653077 kind : match i. node {
30663078 ImplItemKind :: Const ( ..) => hir:: AssociatedItemKind :: Const ,
30673079 ImplItemKind :: Type ( ..) => hir:: AssociatedItemKind :: Type ,
3080+ ImplItemKind :: Existential ( ..) => hir:: AssociatedItemKind :: Existential ,
30683081 ImplItemKind :: Method ( ref sig, _) => hir:: AssociatedItemKind :: Method {
30693082 has_self : sig. decl . has_self ( ) ,
30703083 } ,
@@ -4335,7 +4348,7 @@ impl<'a> LoweringContext<'a> {
43354348 respan ( v. span , node)
43364349 }
43374350
4338- fn lower_defaultness ( & mut self , d : Defaultness , has_value : bool ) -> hir:: Defaultness {
4351+ fn lower_defaultness ( & self , d : Defaultness , has_value : bool ) -> hir:: Defaultness {
43394352 match d {
43404353 Defaultness :: Default => hir:: Defaultness :: Default {
43414354 has_value : has_value,
0 commit comments