Skip to content

Commit a3241d1

Browse files
committed
Don't prepend deriving-generated attributes with _
1 parent 24d410a commit a3241d1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/libsyntax_ext/deriving/cmp/partial_eq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn expand_deriving_partial_eq(cx: &mut ExtCtxt,
7171
name: $name,
7272
generics: LifetimeBounds::empty(),
7373
explicit_self: borrowed_explicit_self(),
74-
args: vec![(borrowed_self(), "_other")],
74+
args: vec![(borrowed_self(), "other")],
7575
ret_ty: Literal(path_local!(bool)),
7676
attributes: attrs,
7777
is_unsafe: false,

src/libsyntax_ext/deriving/debug.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn expand_deriving_debug(cx: &mut ExtCtxt,
4040
name: "fmt",
4141
generics: LifetimeBounds::empty(),
4242
explicit_self: borrowed_explicit_self(),
43-
args: vec![(fmtr, "_f")],
43+
args: vec![(fmtr, "f")],
4444
ret_ty: Literal(path_std!(cx, fmt::Result)),
4545
attributes: Vec::new(),
4646
is_unsafe: false,

src/libsyntax_ext/deriving/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub fn expand_deriving_hash(cx: &mut ExtCtxt,
4545
},
4646
explicit_self: borrowed_explicit_self(),
4747
args: vec![(Ptr(Box::new(Literal(arg)),
48-
Borrowed(None, Mutability::Mutable)), "_state")],
48+
Borrowed(None, Mutability::Mutable)), "state")],
4949
ret_ty: nil_ty(),
5050
attributes: vec![],
5151
is_unsafe: false,

0 commit comments

Comments
 (0)