Don't prepend deriving-generated attributes with _

This commit is contained in:
James Sanderson
2018-04-19 13:57:43 +01:00
parent 24d410abd6
commit a3241d1350
3 changed files with 3 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ pub fn expand_deriving_partial_eq(cx: &mut ExtCtxt,
name: $name,
generics: LifetimeBounds::empty(),
explicit_self: borrowed_explicit_self(),
args: vec![(borrowed_self(), "_other")],
args: vec![(borrowed_self(), "other")],
ret_ty: Literal(path_local!(bool)),
attributes: attrs,
is_unsafe: false,

View File

@@ -40,7 +40,7 @@ pub fn expand_deriving_debug(cx: &mut ExtCtxt,
name: "fmt",
generics: LifetimeBounds::empty(),
explicit_self: borrowed_explicit_self(),
args: vec![(fmtr, "_f")],
args: vec![(fmtr, "f")],
ret_ty: Literal(path_std!(cx, fmt::Result)),
attributes: Vec::new(),
is_unsafe: false,

View File

@@ -45,7 +45,7 @@ pub fn expand_deriving_hash(cx: &mut ExtCtxt,
},
explicit_self: borrowed_explicit_self(),
args: vec![(Ptr(Box::new(Literal(arg)),
Borrowed(None, Mutability::Mutable)), "_state")],
Borrowed(None, Mutability::Mutable)), "state")],
ret_ty: nil_ty(),
attributes: vec![],
is_unsafe: false,