@@ -227,7 +227,7 @@ impl GenericParams {
227227 fn fill_params ( & mut self , lower_ctx : & LowerCtx , params : ast:: GenericParamList ) {
228228 for type_or_const_param in params. type_or_const_params ( ) {
229229 match type_or_const_param {
230- Either :: Left ( type_param) => {
230+ ast :: TypeOrConstParam :: Type ( type_param) => {
231231 let name = type_param. name ( ) . map_or_else ( Name :: missing, |it| it. as_name ( ) ) ;
232232 // FIXME: Use `Path::from_src`
233233 let default = type_param
@@ -242,7 +242,7 @@ impl GenericParams {
242242 let type_ref = TypeRef :: Path ( name. into ( ) ) ;
243243 self . fill_bounds ( lower_ctx, & type_param, Either :: Left ( type_ref) ) ;
244244 }
245- Either :: Right ( const_param) => {
245+ ast :: TypeOrConstParam :: Const ( const_param) => {
246246 let name = const_param. name ( ) . map_or_else ( Name :: missing, |it| it. as_name ( ) ) ;
247247 let ty = const_param
248248 . ty ( )
@@ -425,7 +425,7 @@ fn file_id_and_params_of(
425425}
426426
427427impl HasChildSource < LocalTypeOrConstParamId > for GenericDefId {
428- type Value = Either < Either < ast:: TypeParam , ast :: ConstParam > , ast:: Trait > ;
428+ type Value = Either < ast:: TypeOrConstParam , ast:: Trait > ;
429429 fn child_source (
430430 & self ,
431431 db : & dyn DefDatabase ,
@@ -496,8 +496,12 @@ impl ChildBySource for GenericDefId {
496496 {
497497 let id = TypeOrConstParamId { parent : * self , local_id } ;
498498 match ast_param {
499- Either :: Left ( a) => res[ keys:: TYPE_PARAM ] . insert ( InFile :: new ( file_id, a) , id) ,
500- Either :: Right ( a) => res[ keys:: CONST_PARAM ] . insert ( InFile :: new ( file_id, a) , id) ,
499+ ast:: TypeOrConstParam :: Type ( a) => {
500+ res[ keys:: TYPE_PARAM ] . insert ( InFile :: new ( file_id, a) , id)
501+ }
502+ ast:: TypeOrConstParam :: Const ( a) => {
503+ res[ keys:: CONST_PARAM ] . insert ( InFile :: new ( file_id, a) , id)
504+ }
501505 }
502506 }
503507 for ( local_id, ast_param) in lts_idx_iter. zip ( generic_params_list. lifetime_params ( ) ) {
0 commit comments