-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Provide better names for builtin deriving-generated attributes #49986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
4ae9488
24d410a
a3241d1
b9b650c
1a72d6d
d80797b
27b0f1e
d6feab6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,8 +67,8 @@ fn expand_deriving_decodable_imp(cx: &mut ExtCtxt, | |
PathKind::Global)])], | ||
}, | ||
explicit_self: None, | ||
args: vec![Ptr(Box::new(Literal(Path::new_local(typaram))), | ||
Borrowed(None, Mutability::Mutable))], | ||
args: vec![(Ptr(Box::new(Literal(Path::new_local(typaram))), | ||
Borrowed(None, Mutability::Mutable)), "d")], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "decoder"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also from the trait. Relatedly... are these (decodable/encodable) even used? I couldn't find any references to these in the docs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are, they're from a deprecated builtin thing. See the rustc_serialize crate. |
||
ret_ty: | ||
Literal(Path::new_(pathvec_std!(cx, result::Result), | ||
None, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,8 +148,8 @@ fn expand_deriving_encodable_imp(cx: &mut ExtCtxt, | |
], | ||
}, | ||
explicit_self: borrowed_explicit_self(), | ||
args: vec![Ptr(Box::new(Literal(Path::new_local(typaram))), | ||
Borrowed(None, Mutability::Mutable))], | ||
args: vec![(Ptr(Box::new(Literal(Path::new_local(typaram))), | ||
Borrowed(None, Mutability::Mutable)), "s")], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "encoder"? |
||
ret_ty: Literal(Path::new_( | ||
pathvec_std!(cx, result::Result), | ||
None, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probs should be
fmt
(check what the trait uses)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trait uses "f" (I took all the names from the traits)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Probably should be fmt then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I know why it's short; it's to encourage implementors to keep it short. Leave it
f
then.