hir: remove NodeId from TypeBinding

This commit is contained in:
ljedrz 2019-02-26 15:27:56 +01:00
parent a29ceb9f51
commit 2827f8d4fe
3 changed files with 3 additions and 8 deletions

View File

@ -1151,10 +1151,9 @@ impl<'a> LoweringContext<'a> {
fn lower_ty_binding(&mut self, b: &TypeBinding,
itctx: ImplTraitContext<'_>) -> hir::TypeBinding {
let LoweredNodeId { node_id, hir_id } = self.lower_node_id(b.id);
let LoweredNodeId { node_id: _, hir_id } = self.lower_node_id(b.id);
hir::TypeBinding {
id: node_id,
hir_id,
ident: b.ident,
ty: self.lower_ty(&b.ty, itctx),
@ -1982,14 +1981,13 @@ impl<'a> LoweringContext<'a> {
let LoweredNodeId { node_id: _, hir_id } = this.next_id();
hir::Ty { node: hir::TyKind::Tup(tys), hir_id, span }
};
let LoweredNodeId { node_id, hir_id } = this.next_id();
let LoweredNodeId { node_id: _, hir_id } = this.next_id();
(
hir::GenericArgs {
args: hir_vec![GenericArg::Type(mk_tup(this, inputs, span))],
bindings: hir_vec![
hir::TypeBinding {
id: node_id,
hir_id,
ident: Ident::from_str(FN_OUTPUT_NAME),
ty: output
@ -2326,13 +2324,12 @@ impl<'a> LoweringContext<'a> {
};
// "<Output = T>"
let LoweredNodeId { node_id, hir_id } = this.next_id();
let LoweredNodeId { node_id: _, hir_id } = this.next_id();
let future_params = P(hir::GenericArgs {
args: hir_vec![],
bindings: hir_vec![hir::TypeBinding {
ident: Ident::from_str(FN_OUTPUT_NAME),
ty: output_ty,
id: node_id,
hir_id,
span,
}],

View File

@ -1737,7 +1737,6 @@ pub enum ImplItemKind {
// Bind a type to an associated type: `A=Foo`.
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct TypeBinding {
pub id: NodeId,
pub hir_id: HirId,
pub ident: Ident,
pub ty: P<Ty>,

View File

@ -294,7 +294,6 @@ impl_stable_hash_for!(struct hir::MethodSig {
});
impl_stable_hash_for!(struct hir::TypeBinding {
id,
hir_id,
ident -> (ident.name),
ty,