-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
DSTify Show #18431
DSTify Show #18431
Conversation
@@ -168,7 +168,7 @@ impl<'a> Show for Arguments<'a> { | |||
/// When a format is not otherwise specified, types are formatted by ascribing | |||
/// to this trait. There is not an explicit way of selecting this trait to be | |||
/// used for formatting, it is only if no other format is specified. | |||
pub trait Show { | |||
pub trait Show for Sized? { |
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.
This actually applies pretty generally to all the formatting traits, should they all get for Sized?
as well?
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.
We could add Sized?
to the other formatting traits in case someone wants to do impl Binary for [T]
or something like that. I didn't see any use like that in the repo so I didn't add Sized?
to the other formatting traits, but I guess it wouldn't hurt to do that.
@aturon thoughts?
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.
I'd vote to go ahead and add Sized?
to those traits as well -- seems like there's little harm. Otherwise, this PR looks good to me!
Thanks @japaric! |
Hm, does an unsized type implementing |
It should be ok with |
Nothing specific, just wanted to be sure our |
Added @aturon re-r? |
Looks good modulo the nits that @alexcrichton pointed out. |
Addressed @alexcrichton comments. I'm leaving the UFCS conversion for another PR since it requires the use of re-r? @aturon |
minor: Sync from downstream
r? @aturon
cc #16918