impl From<T> for [T; 1] - #68392
impl From<T> for [T; 1]#68392jyn514 wants to merge 3 commits into
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