Move an EarlyParamRegion impl block.

Next to all the other `EarlyParamRegion` pieces.
This commit is contained in:
Nicholas Nethercote 2025-07-30 08:54:12 +10:00
parent 790ab94798
commit 3a1f2d5cc2
2 changed files with 9 additions and 9 deletions

View file

@ -49,7 +49,7 @@ use rustc_serialize::{Decodable, Encodable};
use rustc_session::lint::LintBuffer;
pub use rustc_session::lint::RegisteredTools;
use rustc_span::hygiene::MacroKind;
use rustc_span::{DUMMY_SP, ExpnId, ExpnKind, Ident, Span, Symbol, kw, sym};
use rustc_span::{DUMMY_SP, ExpnId, ExpnKind, Ident, Span, Symbol, sym};
pub use rustc_type_ir::data_structures::{DelayedMap, DelayedSet};
pub use rustc_type_ir::fast_reject::DeepRejectCtxt;
#[allow(
@ -453,14 +453,6 @@ impl<'tcx> rustc_type_ir::Flags for Ty<'tcx> {
}
}
impl EarlyParamRegion {
/// Does this early bound region have a name? Early bound regions normally
/// always have names except when using anonymous lifetimes (`'_`).
pub fn is_named(&self) -> bool {
self.name != kw::UnderscoreLifetime
}
}
/// The crate outlives map is computed during typeck and contains the
/// outlives of every item in the local crate. You should not use it
/// directly, because to do so will make your pass dependent on the

View file

@ -324,6 +324,14 @@ pub struct EarlyParamRegion {
pub name: Symbol,
}
impl EarlyParamRegion {
/// Does this early bound region have a name? Early bound regions normally
/// always have names except when using anonymous lifetimes (`'_`).
pub fn is_named(&self) -> bool {
self.name != kw::UnderscoreLifetime
}
}
impl rustc_type_ir::inherent::ParamLike for EarlyParamRegion {
fn index(self) -> u32 {
self.index