Uh oh!
There was an error while loading. Please reload this page.
FromIterator and Extend Cow for String - #41449
Conversation
rust-highfive
commented
Apr 21, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @sfackler (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
mrhota
commented
Apr 21, 2017
@Eh2406 can you respond to the comment on the linked issue? Why not |
On the stability attributes: Trait impls are (unfortunately) still insta-stable, they ignore stability attributes. Edit: oh, and it would really need to be |
Eh2406
commented
Apr 21, 2017
I'd love to use the more generic version. It will replace all existing impls. Do we just throw out the stability feature and versions? |
char can not impl Borrow thus the generic does not cover existing stable uses, but rust does not know that it will never impl it so it won't let us have the generic and the specific. // proposed generic versionimpl<T:Borrow<str>>FromIterator<T>forString{}// existing implsimpl<'a>FromIterator<&'astr>forString{...}// remove, covered by generic implFromIterator<String>forString{...}// remove, covered by generic implFromIterator<char>forString{...}// not covered nor compatible with generic |
Eh2406
commented
Apr 22, 2017
Eh2406
commented
Apr 22, 2017
and if I remove the impls for char it corectly points out that the trait |
codyps
commented
Apr 24, 2017
hmm, that is a shame about the conflicts. Can specialization be used here to allow this? (And I suppose the follow up is: do we want to use specialization for this case). |
conflicting implementations but this is my ferst use of specialization. Did I use it wrong? I have bean testing in other prs so that this direct version says mergeable. |
arielb1
commented
Apr 25, 2017
aturon
commented
Apr 29, 2017
Specialization can't be used to tackle this problem, because The core problem is as @Eh2406 identified, which is that Rust is trying to defend against a future where I think this is the best we can do for the time being. Can you update the version numbers on the stability attributes, to 1.19? Otherwise, r=me. |
Eh2406
commented
Apr 29, 2017
Fixed, rebased, and squashed. |
aturon
commented
Apr 29, 2017
Thanks! @bors: r+ rollup |
bors
commented
Apr 29, 2017
📌 Commit 0e2571b has been approved by |
FromIterator and Extend Cow for String This is a quick draft to start working on [rust-lang#41351](rust-lang#41351). I don't think I got the stable attributes correct, but it is good enuf to start a conversation.
FromIterator and Extend Cow for String This is a quick draft to start working on [rust-lang#41351](rust-lang#41351). I don't think I got the stable attributes correct, but it is good enuf to start a conversation.
FromIterator and Extend Cow for String This is a quick draft to start working on [rust-lang#41351](rust-lang#41351). I don't think I got the stable attributes correct, but it is good enuf to start a conversation.
497: impl FromParallelIterator<()> for () r=cuviper a=cuviper This is more useful when combined with higher-level abstractions, like collecting to a `Result<(), E>` where you only care about errors. This is a parallel version of rust-lang/rust#45379. Cc #496 498: FromParallelIterator and ParallelExtend Cow for String r=cuviper a=cuviper Parallel version of rust-lang/rust#41449.
498: FromParallelIterator and ParallelExtend Cow for String r=cuviper a=cuviper Parallel version of rust-lang/rust#41449.
498: FromParallelIterator and ParallelExtend Cow for String r=cuviper a=cuviper Parallel version of rust-lang/rust#41449.
This is a quick draft to start working on #41351.
I don't think I got the stable attributes correct, but it is good enuf to start a conversation.