mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
hir: remove NodeId from TypeBinding
This commit is contained in:
parent
a29ceb9f51
commit
2827f8d4fe
@ -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,
|
||||
}],
|
||||
|
@ -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>,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user