Skip to content

Commit 3a1f2d5

Browse files
committed
Move an EarlyParamRegion impl block.
Next to all the other `EarlyParamRegion` pieces.
1 parent 790ab94 commit 3a1f2d5

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use rustc_serialize::{Decodable, Encodable};
4949
use rustc_session::lint::LintBuffer;
5050
pub use rustc_session::lint::RegisteredTools;
5151
use rustc_span::hygiene::MacroKind;
52-
use rustc_span::{DUMMY_SP, ExpnId, ExpnKind, Ident, Span, Symbol, kw, sym};
52+
use rustc_span::{DUMMY_SP, ExpnId, ExpnKind, Ident, Span, Symbol, sym};
5353
pub use rustc_type_ir::data_structures::{DelayedMap, DelayedSet};
5454
pub use rustc_type_ir::fast_reject::DeepRejectCtxt;
5555
#[allow(
@@ -453,14 +453,6 @@ impl<'tcx> rustc_type_ir::Flags for Ty<'tcx> {
453453
}
454454
}
455455

456-
impl EarlyParamRegion {
457-
/// Does this early bound region have a name? Early bound regions normally
458-
/// always have names except when using anonymous lifetimes (`'_`).
459-
pub fn is_named(&self) -> bool {
460-
self.name != kw::UnderscoreLifetime
461-
}
462-
}
463-
464456
/// The crate outlives map is computed during typeck and contains the
465457
/// outlives of every item in the local crate. You should not use it
466458
/// directly, because to do so will make your pass dependent on the

compiler/rustc_middle/src/ty/region.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ pub struct EarlyParamRegion {
324324
pub name: Symbol,
325325
}
326326

327+
impl EarlyParamRegion {
328+
/// Does this early bound region have a name? Early bound regions normally
329+
/// always have names except when using anonymous lifetimes (`'_`).
330+
pub fn is_named(&self) -> bool {
331+
self.name != kw::UnderscoreLifetime
332+
}
333+
}
334+
327335
impl rustc_type_ir::inherent::ParamLike for EarlyParamRegion {
328336
fn index(self) -> u32 {
329337
self.index

0 commit comments

Comments
 (0)