Skip to content

Commit

Permalink
rustc: remove unused ID from WhereEqPredicate.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Nov 6, 2019
1 parent 772924e commit 08288d9
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 11 deletions.
4 changes: 1 addition & 3 deletions src/librustc/hir/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,11 +803,9 @@ pub fn walk_where_predicate<'v, V: Visitor<'v>>(
visitor.visit_lifetime(lifetime);
walk_list!(visitor, visit_param_bound, bounds);
}
&WherePredicate::EqPredicate(WhereEqPredicate{hir_id,
ref lhs_ty,
&WherePredicate::EqPredicate(WhereEqPredicate{ref lhs_ty,
ref rhs_ty,
..}) => {
visitor.visit_id(hir_id);
visitor.visit_ty(lhs_ty);
visitor.visit_ty(rhs_ty);
}
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/hir/lowering/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1442,13 +1442,11 @@ impl LoweringContext<'_> {
bounds: self.lower_param_bounds(bounds, ImplTraitContext::disallowed()),
}),
WherePredicate::EqPredicate(WhereEqPredicate {
id,
ref lhs_ty,
ref rhs_ty,
span,
}) => {
hir::WherePredicate::EqPredicate(hir::WhereEqPredicate {
hir_id: self.lower_node_id(id),
lhs_ty: self.lower_ty(lhs_ty, ImplTraitContext::disallowed()),
rhs_ty: self.lower_ty(rhs_ty, ImplTraitContext::disallowed()),
span,
Expand Down
1 change: 0 additions & 1 deletion src/librustc/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,6 @@ pub struct WhereRegionPredicate {
/// An equality predicate (e.g., `T = int`); currently unsupported.
#[derive(RustcEncodable, RustcDecodable, Debug, HashStable)]
pub struct WhereEqPredicate {
pub hir_id: HirId,
pub span: Span,
pub lhs_ty: P<Ty>,
pub rhs_ty: P<Ty>,
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ pub struct WhereRegionPredicate {
/// E.g., `T = int`.
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct WhereEqPredicate {
pub id: NodeId,
pub span: Span,
pub lhs_ty: P<Ty>,
pub rhs_ty: P<Ty>,
Expand Down
3 changes: 1 addition & 2 deletions src/libsyntax/mut_visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,7 @@ pub fn noop_visit_where_predicate<T: MutVisitor>(pred: &mut WherePredicate, vis:
visit_vec(bounds, |bound| noop_visit_param_bound(bound, vis));
}
WherePredicate::EqPredicate(ep) => {
let WhereEqPredicate { id, span, lhs_ty, rhs_ty } = ep;
vis.visit_id(id);
let WhereEqPredicate { span, lhs_ty, rhs_ty } = ep;
vis.visit_span(span);
vis.visit_ty(lhs_ty);
vis.visit_ty(rhs_ty);
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/parse/parser/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ impl<'a> Parser<'a> {
span: lo.to(self.prev_span),
lhs_ty: ty,
rhs_ty,
id: ast::DUMMY_NODE_ID,
}
))
} else {
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax_ext/deriving/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ impl<'a> TraitDef<'a> {
}
ast::WherePredicate::EqPredicate(ref we) => {
ast::WherePredicate::EqPredicate(ast::WhereEqPredicate {
id: ast::DUMMY_NODE_ID,
span: self.span,
lhs_ty: we.lhs_ty.clone(),
rhs_ty: we.rhs_ty.clone(),
Expand Down

0 comments on commit 08288d9

Please sign in to comment.