Don't prepend deriving-generated attributes with _
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user