Skip to content

Commit d13fa0d

Browse files
committed
Remove Substructure::method_ident.
It's unused.
1 parent 7a4fdcb commit d13fa0d

File tree

1 file changed

+1
-9
lines changed
  • compiler/rustc_builtin_macros/src/deriving/generic

1 file changed

+1
-9
lines changed

compiler/rustc_builtin_macros/src/deriving/generic/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ pub struct MethodDef<'a> {
253253
pub struct Substructure<'a> {
254254
/// ident of self
255255
pub type_ident: Ident,
256-
/// ident of the method
257-
pub method_ident: Ident,
258256
/// dereferenced access to any [`Self_`] or [`Ptr(Self_, _)`][ptr] arguments
259257
///
260258
/// [`Self_`]: ty::Ty::Self_
@@ -845,13 +843,7 @@ impl<'a> MethodDef<'a> {
845843
fields: &SubstructureFields<'_>,
846844
) -> P<Expr> {
847845
let span = trait_.span;
848-
let substructure = Substructure {
849-
type_ident,
850-
method_ident: Ident::new(self.name, span),
851-
self_args,
852-
nonself_args,
853-
fields,
854-
};
846+
let substructure = Substructure { type_ident, self_args, nonself_args, fields };
855847
let mut f = self.combine_substructure.borrow_mut();
856848
let f: &mut CombineSubstructureFunc<'_> = &mut *f;
857849
f(cx, span, &substructure)

0 commit comments

Comments
 (0)