From d13fa0d21bd3080ae180e244274bde055d311e1d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 28 Jun 2022 11:37:44 +1000 Subject: [PATCH] Remove `Substructure::method_ident`. It's unused. --- .../rustc_builtin_macros/src/deriving/generic/mod.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs index 82eb064edb0..e84b9fe9997 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs @@ -253,8 +253,6 @@ pub struct MethodDef<'a> { pub struct Substructure<'a> { /// ident of self pub type_ident: Ident, - /// ident of the method - pub method_ident: Ident, /// dereferenced access to any [`Self_`] or [`Ptr(Self_, _)`][ptr] arguments /// /// [`Self_`]: ty::Ty::Self_ @@ -845,13 +843,7 @@ impl<'a> MethodDef<'a> { fields: &SubstructureFields<'_>, ) -> P { let span = trait_.span; - let substructure = Substructure { - type_ident, - method_ident: Ident::new(self.name, span), - self_args, - nonself_args, - fields, - }; + let substructure = Substructure { type_ident, self_args, nonself_args, fields }; let mut f = self.combine_substructure.borrow_mut(); let f: &mut CombineSubstructureFunc<'_> = &mut *f; f(cx, span, &substructure)