@@ -323,7 +323,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
323323 }
324324
325325 module = match ribs[ i] . kind {
326- RibKind :: ModuleRibKind ( module) => module,
326+ RibKind :: Module ( module) => module,
327327 RibKind :: MacroDefinition ( def) if def == self . macro_def ( ident. span . ctxt ( ) ) => {
328328 // If an invocation of this macro created `ident`, give up on `ident`
329329 // and switch to `ident`'s source from the macro definition.
@@ -1083,7 +1083,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
10831083 let ribs = & all_ribs[ rib_index + 1 ..] ;
10841084
10851085 // An invalid forward use of a generic parameter from a previous default.
1086- if let RibKind :: ForwardGenericParamBanRibKind = all_ribs[ rib_index] . kind {
1086+ if let RibKind :: ForwardGenericParamBan = all_ribs[ rib_index] . kind {
10871087 if let Some ( span) = finalize {
10881088 let res_error = if rib_ident. name == kw:: SelfUpper {
10891089 ResolutionError :: SelfInGenericParamDefault
@@ -1103,14 +1103,14 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
11031103
11041104 for rib in ribs {
11051105 match rib. kind {
1106- RibKind :: NormalRibKind
1107- | RibKind :: ClosureOrAsyncRibKind
1108- | RibKind :: ModuleRibKind ( ..)
1106+ RibKind :: Normal
1107+ | RibKind :: ClosureOrAsync
1108+ | RibKind :: Module ( ..)
11091109 | RibKind :: MacroDefinition ( ..)
1110- | RibKind :: ForwardGenericParamBanRibKind => {
1110+ | RibKind :: ForwardGenericParamBan => {
11111111 // Nothing to do. Continue.
11121112 }
1113- RibKind :: ItemRibKind ( _) | RibKind :: AssocItemRibKind => {
1113+ RibKind :: Item ( _) | RibKind :: AssocItem => {
11141114 // This was an attempt to access an upvar inside a
11151115 // named function item. This is not allowed, so we
11161116 // report an error.
@@ -1122,7 +1122,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
11221122 res_err = Some ( ( span, CannotCaptureDynamicEnvironmentInFnItem ) ) ;
11231123 }
11241124 }
1125- RibKind :: ConstantItemRibKind ( _, item) => {
1125+ RibKind :: ConstantItem ( _, item) => {
11261126 // Still doesn't deal with upvars
11271127 if let Some ( span) = finalize {
11281128 let ( span, resolution_error) =
@@ -1151,13 +1151,13 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
11511151 }
11521152 return Res :: Err ;
11531153 }
1154- RibKind :: ConstParamTyRibKind => {
1154+ RibKind :: ConstParamTy => {
11551155 if let Some ( span) = finalize {
11561156 self . report_error ( span, ParamInTyOfConstParam ( rib_ident. name ) ) ;
11571157 }
11581158 return Res :: Err ;
11591159 }
1160- RibKind :: InlineAsmSymRibKind => {
1160+ RibKind :: InlineAsmSym => {
11611161 if let Some ( span) = finalize {
11621162 self . report_error ( span, InvalidAsmSym ) ;
11631163 }
@@ -1173,18 +1173,18 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
11731173 Res :: Def ( DefKind :: TyParam , _) | Res :: SelfTyParam { .. } | Res :: SelfTyAlias { .. } => {
11741174 for rib in ribs {
11751175 let has_generic_params: HasGenericParams = match rib. kind {
1176- RibKind :: NormalRibKind
1177- | RibKind :: ClosureOrAsyncRibKind
1178- | RibKind :: ModuleRibKind ( ..)
1176+ RibKind :: Normal
1177+ | RibKind :: ClosureOrAsync
1178+ | RibKind :: Module ( ..)
11791179 | RibKind :: MacroDefinition ( ..)
1180- | RibKind :: InlineAsmSymRibKind
1181- | RibKind :: AssocItemRibKind
1182- | RibKind :: ForwardGenericParamBanRibKind => {
1180+ | RibKind :: InlineAsmSym
1181+ | RibKind :: AssocItem
1182+ | RibKind :: ForwardGenericParamBan => {
11831183 // Nothing to do. Continue.
11841184 continue ;
11851185 }
11861186
1187- RibKind :: ConstantItemRibKind ( trivial, _) => {
1187+ RibKind :: ConstantItem ( trivial, _) => {
11881188 let features = self . tcx . sess . features_untracked ( ) ;
11891189 // HACK(min_const_generics): We currently only allow `N` or `{ N }`.
11901190 if !( trivial == ConstantHasGenerics :: Yes
@@ -1225,8 +1225,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
12251225 }
12261226
12271227 // This was an attempt to use a type parameter outside its scope.
1228- RibKind :: ItemRibKind ( has_generic_params) => has_generic_params,
1229- RibKind :: ConstParamTyRibKind => {
1228+ RibKind :: Item ( has_generic_params) => has_generic_params,
1229+ RibKind :: ConstParamTy => {
12301230 if let Some ( span) = finalize {
12311231 self . report_error (
12321232 span,
@@ -1252,15 +1252,15 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
12521252 Res :: Def ( DefKind :: ConstParam , _) => {
12531253 for rib in ribs {
12541254 let has_generic_params = match rib. kind {
1255- RibKind :: NormalRibKind
1256- | RibKind :: ClosureOrAsyncRibKind
1257- | RibKind :: ModuleRibKind ( ..)
1255+ RibKind :: Normal
1256+ | RibKind :: ClosureOrAsync
1257+ | RibKind :: Module ( ..)
12581258 | RibKind :: MacroDefinition ( ..)
1259- | RibKind :: InlineAsmSymRibKind
1260- | RibKind :: AssocItemRibKind
1261- | RibKind :: ForwardGenericParamBanRibKind => continue ,
1259+ | RibKind :: InlineAsmSym
1260+ | RibKind :: AssocItem
1261+ | RibKind :: ForwardGenericParamBan => continue ,
12621262
1263- RibKind :: ConstantItemRibKind ( trivial, _) => {
1263+ RibKind :: ConstantItem ( trivial, _) => {
12641264 let features = self . tcx . sess . features_untracked ( ) ;
12651265 // HACK(min_const_generics): We currently only allow `N` or `{ N }`.
12661266 if !( trivial == ConstantHasGenerics :: Yes
@@ -1283,8 +1283,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
12831283 continue ;
12841284 }
12851285
1286- RibKind :: ItemRibKind ( has_generic_params) => has_generic_params,
1287- RibKind :: ConstParamTyRibKind => {
1286+ RibKind :: Item ( has_generic_params) => has_generic_params,
1287+ RibKind :: ConstParamTy => {
12881288 if let Some ( span) = finalize {
12891289 self . report_error (
12901290 span,
0 commit comments