-
Notifications
You must be signed in to change notification settings - Fork 13.4k
impl From<T> for [T; 1] #68392
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
impl From<T> for [T; 1] #68392
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
How would this implementation allow your example to compile? |
@sfackler looking back at it, it probably wouldn't have. I think this feature stands on its own, though.
|
What about accepting |
@lzutao the idea was to avoid requiring additional effort from the caller. In any case I solved it a different way that still only took one argument. |
I feel like an example like this would require |
r? @Amanieu |
@jyn514 You said you've solved your issue. Does that mean that you don't need this feature any more? |
I guess not. I'm ok with closing this if you think it's not worth the hassle. #68692 would still be super useful though. |
I would have found this useful for writing functions like this: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b9c1e08152d1cd3709edf65587d87fc7