Skip to content

Commit 3e04fed

Browse files
committed
Remove {ast,hir}::WhereEqPredicate::id.
These fields are unused.
1 parent 4033686 commit 3e04fed

File tree

7 files changed

+4
-16
lines changed

7 files changed

+4
-16
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,6 @@ pub struct WhereRegionPredicate {
497497
/// E.g., `T = int`.
498498
#[derive(Clone, Encodable, Decodable, Debug)]
499499
pub struct WhereEqPredicate {
500-
pub id: NodeId,
501500
pub span: Span,
502501
pub lhs_ty: P<Ty>,
503502
pub rhs_ty: P<Ty>,

compiler/rustc_ast/src/mut_visit.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,8 +933,7 @@ pub fn noop_visit_where_predicate<T: MutVisitor>(pred: &mut WherePredicate, vis:
933933
visit_vec(bounds, |bound| noop_visit_param_bound(bound, vis));
934934
}
935935
WherePredicate::EqPredicate(ep) => {
936-
let WhereEqPredicate { id, span, lhs_ty, rhs_ty } = ep;
937-
vis.visit_id(id);
936+
let WhereEqPredicate { span, lhs_ty, rhs_ty } = ep;
938937
vis.visit_span(span);
939938
vis.visit_ty(lhs_ty);
940939
vis.visit_ty(rhs_ty);

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,9 +1498,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
14981498
),
14991499
in_where_clause: true,
15001500
}),
1501-
WherePredicate::EqPredicate(WhereEqPredicate { id, ref lhs_ty, ref rhs_ty, span }) => {
1501+
WherePredicate::EqPredicate(WhereEqPredicate { ref lhs_ty, ref rhs_ty, span }) => {
15021502
hir::WherePredicate::EqPredicate(hir::WhereEqPredicate {
1503-
hir_id: self.lower_node_id(id),
15041503
lhs_ty: self
15051504
.lower_ty(lhs_ty, ImplTraitContext::Disallowed(ImplTraitPosition::Type)),
15061505
rhs_ty: self

compiler/rustc_builtin_macros/src/deriving/generic/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,7 @@ impl<'a> TraitDef<'a> {
640640
}
641641
ast::WherePredicate::EqPredicate(we) => {
642642
let span = we.span.with_ctxt(ctxt);
643-
ast::WherePredicate::EqPredicate(ast::WhereEqPredicate {
644-
id: ast::DUMMY_NODE_ID,
645-
span,
646-
..we.clone()
647-
})
643+
ast::WherePredicate::EqPredicate(ast::WhereEqPredicate { span, ..we.clone() })
648644
}
649645
}
650646
}));

compiler/rustc_hir/src/hir.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,6 @@ impl<'hir> WhereRegionPredicate<'hir> {
778778
/// An equality predicate (e.g., `T = int`); currently unsupported.
779779
#[derive(Debug, HashStable_Generic)]
780780
pub struct WhereEqPredicate<'hir> {
781-
pub hir_id: HirId,
782781
pub span: Span,
783782
pub lhs_ty: &'hir Ty<'hir>,
784783
pub rhs_ty: &'hir Ty<'hir>,

compiler/rustc_hir/src/intravisit.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,10 +876,7 @@ pub fn walk_where_predicate<'v, V: Visitor<'v>>(
876876
visitor.visit_lifetime(lifetime);
877877
walk_list!(visitor, visit_param_bound, bounds);
878878
}
879-
WherePredicate::EqPredicate(WhereEqPredicate {
880-
hir_id, ref lhs_ty, ref rhs_ty, ..
881-
}) => {
882-
visitor.visit_id(hir_id);
879+
WherePredicate::EqPredicate(WhereEqPredicate { ref lhs_ty, ref rhs_ty, .. }) => {
883880
visitor.visit_ty(lhs_ty);
884881
visitor.visit_ty(rhs_ty);
885882
}

compiler/rustc_parse/src/parser/generics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ impl<'a> Parser<'a> {
314314
span: lo.to(self.prev_token.span),
315315
lhs_ty: ty,
316316
rhs_ty,
317-
id: ast::DUMMY_NODE_ID,
318317
}))
319318
} else {
320319
self.maybe_recover_bounds_doubled_colon(&ty)?;

0 commit comments

Comments
 (0)