Skip to content

Commit 08288d9

Browse files
committed
rustc: remove unused ID from WhereEqPredicate.
1 parent 772924e commit 08288d9

File tree

7 files changed

+2
-11
lines changed

7 files changed

+2
-11
lines changed

src/librustc/hir/intravisit.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -803,11 +803,9 @@ pub fn walk_where_predicate<'v, V: Visitor<'v>>(
803803
visitor.visit_lifetime(lifetime);
804804
walk_list!(visitor, visit_param_bound, bounds);
805805
}
806-
&WherePredicate::EqPredicate(WhereEqPredicate{hir_id,
807-
ref lhs_ty,
806+
&WherePredicate::EqPredicate(WhereEqPredicate{ref lhs_ty,
808807
ref rhs_ty,
809808
..}) => {
810-
visitor.visit_id(hir_id);
811809
visitor.visit_ty(lhs_ty);
812810
visitor.visit_ty(rhs_ty);
813811
}

src/librustc/hir/lowering/item.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1442,13 +1442,11 @@ impl LoweringContext<'_> {
14421442
bounds: self.lower_param_bounds(bounds, ImplTraitContext::disallowed()),
14431443
}),
14441444
WherePredicate::EqPredicate(WhereEqPredicate {
1445-
id,
14461445
ref lhs_ty,
14471446
ref rhs_ty,
14481447
span,
14491448
}) => {
14501449
hir::WherePredicate::EqPredicate(hir::WhereEqPredicate {
1451-
hir_id: self.lower_node_id(id),
14521450
lhs_ty: self.lower_ty(lhs_ty, ImplTraitContext::disallowed()),
14531451
rhs_ty: self.lower_ty(rhs_ty, ImplTraitContext::disallowed()),
14541452
span,

src/librustc/hir/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,6 @@ pub struct WhereRegionPredicate {
721721
/// An equality predicate (e.g., `T = int`); currently unsupported.
722722
#[derive(RustcEncodable, RustcDecodable, Debug, HashStable)]
723723
pub struct WhereEqPredicate {
724-
pub hir_id: HirId,
725724
pub span: Span,
726725
pub lhs_ty: P<Ty>,
727726
pub rhs_ty: P<Ty>,

src/libsyntax/ast.rs

-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ pub struct WhereRegionPredicate {
457457
/// E.g., `T = int`.
458458
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
459459
pub struct WhereEqPredicate {
460-
pub id: NodeId,
461460
pub span: Span,
462461
pub lhs_ty: P<Ty>,
463462
pub rhs_ty: P<Ty>,

src/libsyntax/mut_visit.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,7 @@ pub fn noop_visit_where_predicate<T: MutVisitor>(pred: &mut WherePredicate, vis:
794794
visit_vec(bounds, |bound| noop_visit_param_bound(bound, vis));
795795
}
796796
WherePredicate::EqPredicate(ep) => {
797-
let WhereEqPredicate { id, span, lhs_ty, rhs_ty } = ep;
798-
vis.visit_id(id);
797+
let WhereEqPredicate { span, lhs_ty, rhs_ty } = ep;
799798
vis.visit_span(span);
800799
vis.visit_ty(lhs_ty);
801800
vis.visit_ty(rhs_ty);

src/libsyntax/parse/parser/generics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ impl<'a> Parser<'a> {
271271
span: lo.to(self.prev_span),
272272
lhs_ty: ty,
273273
rhs_ty,
274-
id: ast::DUMMY_NODE_ID,
275274
}
276275
))
277276
} else {

src/libsyntax_ext/deriving/generic/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ impl<'a> TraitDef<'a> {
581581
}
582582
ast::WherePredicate::EqPredicate(ref we) => {
583583
ast::WherePredicate::EqPredicate(ast::WhereEqPredicate {
584-
id: ast::DUMMY_NODE_ID,
585584
span: self.span,
586585
lhs_ty: we.lhs_ty.clone(),
587586
rhs_ty: we.rhs_ty.clone(),

0 commit comments

Comments
 (0)