Skip to content

Commit cd5b5e7

Browse files
committed
hir: remove NodeId from WhereClause
1 parent e4f8a6b commit cd5b5e7

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

src/librustc/hir/lowering.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,12 +1391,11 @@ impl<'a> LoweringContext<'a> {
13911391
);
13921392

13931393
self.with_hir_id_owner(exist_ty_node_id, |lctx| {
1394-
let LoweredNodeId { node_id, hir_id } = lctx.next_id();
1394+
let LoweredNodeId { node_id: _, hir_id } = lctx.next_id();
13951395
let exist_ty_item_kind = hir::ItemKind::Existential(hir::ExistTy {
13961396
generics: hir::Generics {
13971397
params: lifetime_defs,
13981398
where_clause: hir::WhereClause {
1399-
id: node_id,
14001399
hir_id,
14011400
predicates: Vec::new().into(),
14021401
},
@@ -2599,10 +2598,9 @@ impl<'a> LoweringContext<'a> {
25992598
self.with_anonymous_lifetime_mode(
26002599
AnonymousLifetimeMode::ReportError,
26012600
|this| {
2602-
let LoweredNodeId { node_id, hir_id } = this.lower_node_id(wc.id);
2601+
let LoweredNodeId { node_id: _, hir_id } = this.lower_node_id(wc.id);
26032602

26042603
hir::WhereClause {
2605-
id: node_id,
26062604
hir_id,
26072605
predicates: wc.predicates
26082606
.iter()

src/librustc/hir/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use errors::FatalError;
1919
use syntax_pos::{Span, DUMMY_SP, symbol::InternedString};
2020
use syntax::source_map::Spanned;
2121
use rustc_target::spec::abi::Abi;
22-
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
22+
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, AsmDialect};
2323
use syntax::ast::{Attribute, Label, Lit, StrStyle, FloatTy, IntTy, UintTy};
2424
use syntax::attr::{InlineAttr, OptimizeAttr};
2525
use syntax::ext::hygiene::SyntaxContext;
@@ -583,7 +583,6 @@ impl Generics {
583583
Generics {
584584
params: HirVec::new(),
585585
where_clause: WhereClause {
586-
id: DUMMY_NODE_ID,
587586
hir_id: DUMMY_HIR_ID,
588587
predicates: HirVec::new(),
589588
},
@@ -628,7 +627,6 @@ pub enum SyntheticTyParamKind {
628627
/// A where-clause in a definition.
629628
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
630629
pub struct WhereClause {
631-
pub id: NodeId,
632630
pub hir_id: HirId,
633631
pub predicates: HirVec<WherePredicate>,
634632
}

src/librustc/hir/print.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,6 @@ impl<'a> State<'a> {
22482248
let generics = hir::Generics {
22492249
params: hir::HirVec::new(),
22502250
where_clause: hir::WhereClause {
2251-
id: ast::DUMMY_NODE_ID,
22522251
hir_id: hir::DUMMY_HIR_ID,
22532252
predicates: hir::HirVec::new(),
22542253
},

src/librustc/ich/impls_hir.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ impl_stable_hash_for!(enum hir::SyntheticTyParamKind {
253253
});
254254

255255
impl_stable_hash_for!(struct hir::WhereClause {
256-
id,
257256
hir_id,
258257
predicates
259258
});

0 commit comments

Comments
 (0)