diff options
| author | lcnr <rust@lcnr.de> | 2023-11-14 13:13:27 +0000 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2023-11-14 13:13:27 +0000 |
| commit | 15f21562e627cb37e74d5e27f22eafc76cf4ec01 (patch) | |
| tree | 67136a951b052553165db07c40f06bd9c9c813f3 /compiler/rustc_middle/src/ty/generics.rs | |
| parent | 5526682702c502626f5dc31f80d07f2b7339c81a (diff) | |
| download | rust-15f21562e627cb37e74d5e27f22eafc76cf4ec01.tar.gz rust-15f21562e627cb37e74d5e27f22eafc76cf4ec01.zip | |
finish `RegionKind` rename
- `ReFree` -> `ReLateParam` - `ReEarlyBound` -> `ReEarlyParam`
Diffstat (limited to 'compiler/rustc_middle/src/ty/generics.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/generics.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/ty/generics.rs b/compiler/rustc_middle/src/ty/generics.rs index 888ee1d237a..4a6e3cfacd3 100644 --- a/compiler/rustc_middle/src/ty/generics.rs +++ b/compiler/rustc_middle/src/ty/generics.rs @@ -6,7 +6,7 @@ use rustc_hir::def_id::DefId; use rustc_span::symbol::{kw, Symbol}; use rustc_span::Span; -use super::{Clause, EarlyBoundRegion, InstantiatedPredicates, ParamConst, ParamTy, Ty, TyCtxt}; +use super::{Clause, InstantiatedPredicates, ParamConst, ParamTy, Ty, TyCtxt}; #[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable)] pub enum GenericParamDefKind { @@ -62,9 +62,9 @@ pub struct GenericParamDef { } impl GenericParamDef { - pub fn to_early_bound_region_data(&self) -> ty::EarlyBoundRegion { + pub fn to_early_bound_region_data(&self) -> ty::EarlyParamRegion { if let GenericParamDefKind::Lifetime = self.kind { - ty::EarlyBoundRegion { def_id: self.def_id, index: self.index, name: self.name } + ty::EarlyParamRegion { def_id: self.def_id, index: self.index, name: self.name } } else { bug!("cannot convert a non-lifetime parameter def to an early bound region") } @@ -260,10 +260,10 @@ impl<'tcx> Generics { } } - /// Returns the `GenericParamDef` associated with this `EarlyBoundRegion`. + /// Returns the `GenericParamDef` associated with this `EarlyParamRegion`. pub fn region_param( &'tcx self, - param: &EarlyBoundRegion, + param: &ty::EarlyParamRegion, tcx: TyCtxt<'tcx>, ) -> &'tcx GenericParamDef { let param = self.param_at(param.index as usize, tcx); |
