Move an EarlyParamRegion impl block.
Next to all the other `EarlyParamRegion` pieces.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user