hir: remove NodeId from WhereClause
This commit is contained in:
parent
e4f8a6bcc1
commit
cd5b5e7a80
4 changed files with 3 additions and 9 deletions
|
|
@ -1391,12 +1391,11 @@ impl<'a> LoweringContext<'a> {
|
|||
);
|
||||
|
||||
self.with_hir_id_owner(exist_ty_node_id, |lctx| {
|
||||
let LoweredNodeId { node_id, hir_id } = lctx.next_id();
|
||||
let LoweredNodeId { node_id: _, hir_id } = lctx.next_id();
|
||||
let exist_ty_item_kind = hir::ItemKind::Existential(hir::ExistTy {
|
||||
generics: hir::Generics {
|
||||
params: lifetime_defs,
|
||||
where_clause: hir::WhereClause {
|
||||
id: node_id,
|
||||
hir_id,
|
||||
predicates: Vec::new().into(),
|
||||
},
|
||||
|
|
@ -2599,10 +2598,9 @@ impl<'a> LoweringContext<'a> {
|
|||
self.with_anonymous_lifetime_mode(
|
||||
AnonymousLifetimeMode::ReportError,
|
||||
|this| {
|
||||
let LoweredNodeId { node_id, hir_id } = this.lower_node_id(wc.id);
|
||||
let LoweredNodeId { node_id: _, hir_id } = this.lower_node_id(wc.id);
|
||||
|
||||
hir::WhereClause {
|
||||
id: node_id,
|
||||
hir_id,
|
||||
predicates: wc.predicates
|
||||
.iter()
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use errors::FatalError;
|
|||
use syntax_pos::{Span, DUMMY_SP, symbol::InternedString};
|
||||
use syntax::source_map::Spanned;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
|
||||
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, AsmDialect};
|
||||
use syntax::ast::{Attribute, Label, Lit, StrStyle, FloatTy, IntTy, UintTy};
|
||||
use syntax::attr::{InlineAttr, OptimizeAttr};
|
||||
use syntax::ext::hygiene::SyntaxContext;
|
||||
|
|
@ -583,7 +583,6 @@ impl Generics {
|
|||
Generics {
|
||||
params: HirVec::new(),
|
||||
where_clause: WhereClause {
|
||||
id: DUMMY_NODE_ID,
|
||||
hir_id: DUMMY_HIR_ID,
|
||||
predicates: HirVec::new(),
|
||||
},
|
||||
|
|
@ -628,7 +627,6 @@ pub enum SyntheticTyParamKind {
|
|||
/// A where-clause in a definition.
|
||||
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||
pub struct WhereClause {
|
||||
pub id: NodeId,
|
||||
pub hir_id: HirId,
|
||||
pub predicates: HirVec<WherePredicate>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2248,7 +2248,6 @@ impl<'a> State<'a> {
|
|||
let generics = hir::Generics {
|
||||
params: hir::HirVec::new(),
|
||||
where_clause: hir::WhereClause {
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
hir_id: hir::DUMMY_HIR_ID,
|
||||
predicates: hir::HirVec::new(),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -253,7 +253,6 @@ impl_stable_hash_for!(enum hir::SyntheticTyParamKind {
|
|||
});
|
||||
|
||||
impl_stable_hash_for!(struct hir::WhereClause {
|
||||
id,
|
||||
hir_id,
|
||||
predicates
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue