Skip to content

Commit

Permalink
Remove in_band_lifetimes from rustc_hir
Browse files Browse the repository at this point in the history
  • Loading branch information
pitaj committed Dec 14, 2021
1 parent 8f117a7 commit 7085b4e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ pub struct GenericParam<'hir> {
pub kind: GenericParamKind<'hir>,
}

impl GenericParam<'hir> {
impl<'hir> GenericParam<'hir> {
pub fn bounds_span_for_suggestions(&self) -> Option<Span> {
self.bounds
.iter()
Expand Down Expand Up @@ -557,7 +557,7 @@ pub struct Generics<'hir> {
pub span: Span,
}

impl Generics<'hir> {
impl<'hir> Generics<'hir> {
pub const fn empty() -> Generics<'hir> {
Generics {
params: &[],
Expand Down Expand Up @@ -622,7 +622,7 @@ pub enum WherePredicate<'hir> {
EqPredicate(WhereEqPredicate<'hir>),
}

impl WherePredicate<'_> {
impl<'hir> WherePredicate<'hir> {
pub fn span(&self) -> Span {
match self {
WherePredicate::BoundPredicate(p) => p.span,
Expand All @@ -644,7 +644,7 @@ pub struct WhereBoundPredicate<'hir> {
pub bounds: GenericBounds<'hir>,
}

impl WhereBoundPredicate<'hir> {
impl<'hir> WhereBoundPredicate<'hir> {
/// Returns `true` if `param_def_id` matches the `bounded_ty` of this predicate.
pub fn is_param_bound(&self, param_def_id: DefId) -> bool {
let path = match self.bounded_ty.kind {
Expand Down Expand Up @@ -1236,7 +1236,7 @@ pub struct Body<'hir> {
pub generator_kind: Option<GeneratorKind>,
}

impl Body<'hir> {
impl<'hir> Body<'hir> {
pub fn id(&self) -> BodyId {
BodyId { hir_id: self.value.hir_id }
}
Expand Down Expand Up @@ -2623,7 +2623,7 @@ pub enum VariantData<'hir> {
Unit(HirId),
}

impl VariantData<'hir> {
impl<'hir> VariantData<'hir> {
/// Return the fields of this variant.
pub fn fields(&self) -> &'hir [FieldDef<'hir>] {
match *self {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub trait Map<'hir> {
}

// Used when no map is actually available, forcing manual implementation of nested visitors.
impl Map<'hir> for ! {
impl<'hir> Map<'hir> for ! {
fn find(&self, _: HirId) -> Option<Node<'hir>> {
unreachable!()
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_hir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#![feature(const_btree_new)]
#![feature(crate_visibility_modifier)]
#![feature(in_band_lifetimes)]
#![feature(once_cell)]
#![feature(min_specialization)]
#![feature(never_type)]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir/src/stable_hash_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for Item<'_> {
}
}

impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for OwnerNodes<'tcx> {
impl<'tcx, HirCtx: crate::HashStableContext> HashStable<HirCtx> for OwnerNodes<'tcx> {
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
// We ignore the `nodes` and `bodies` fields since these refer to information included in
// `hash` which is hashed in the collector and used for the crate hash.
Expand All @@ -221,7 +221,7 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for OwnerNodes<'tcx> {
}
}

impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for AttributeMap<'tcx> {
impl<'tcx, HirCtx: crate::HashStableContext> HashStable<HirCtx> for AttributeMap<'tcx> {
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
// We ignore the `map` since it refers to information included in `hash` which is hashed in
// the collector and used for the crate hash.
Expand Down

0 comments on commit 7085b4e

Please sign in to comment.