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,
|
name: $name,
|
||||||
generics: LifetimeBounds::empty(),
|
generics: LifetimeBounds::empty(),
|
||||||
explicit_self: borrowed_explicit_self(),
|
explicit_self: borrowed_explicit_self(),
|
||||||
args: vec![(borrowed_self(), "_other")],
|
args: vec![(borrowed_self(), "other")],
|
||||||
ret_ty: Literal(path_local!(bool)),
|
ret_ty: Literal(path_local!(bool)),
|
||||||
attributes: attrs,
|
attributes: attrs,
|
||||||
is_unsafe: false,
|
is_unsafe: false,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ pub fn expand_deriving_debug(cx: &mut ExtCtxt,
|
|||||||
name: "fmt",
|
name: "fmt",
|
||||||
generics: LifetimeBounds::empty(),
|
generics: LifetimeBounds::empty(),
|
||||||
explicit_self: borrowed_explicit_self(),
|
explicit_self: borrowed_explicit_self(),
|
||||||
args: vec![(fmtr, "_f")],
|
args: vec![(fmtr, "f")],
|
||||||
ret_ty: Literal(path_std!(cx, fmt::Result)),
|
ret_ty: Literal(path_std!(cx, fmt::Result)),
|
||||||
attributes: Vec::new(),
|
attributes: Vec::new(),
|
||||||
is_unsafe: false,
|
is_unsafe: false,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ pub fn expand_deriving_hash(cx: &mut ExtCtxt,
|
|||||||
},
|
},
|
||||||
explicit_self: borrowed_explicit_self(),
|
explicit_self: borrowed_explicit_self(),
|
||||||
args: vec![(Ptr(Box::new(Literal(arg)),
|
args: vec![(Ptr(Box::new(Literal(arg)),
|
||||||
Borrowed(None, Mutability::Mutable)), "_state")],
|
Borrowed(None, Mutability::Mutable)), "state")],
|
||||||
ret_ty: nil_ty(),
|
ret_ty: nil_ty(),
|
||||||
attributes: vec![],
|
attributes: vec![],
|
||||||
is_unsafe: false,
|
is_unsafe: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user