Uh oh!
There was an error while loading. Please reload this page.
Remove the default Send bound on traits - #13050
Conversation
flaper87
commented
Mar 21, 2014
LGTM. I always try to keep each commit "compilable" so, I'd prefer if these commits were squashed. |
huonw
commented
Mar 21, 2014
@flaper87 these cases are often a good time to break that (useful) rule, to make it super-clear what the core change is, and what the purely mechanical fix-ups are. |
flaper87
commented
Mar 21, 2014
@huonw agreed, I find them useful as well. Perhaps those could be squashed after the review and before the final approve. With that we'd loose the benefit of these commits being split in the history, though. Anyway, probably not a big deal. |
huonw
commented
Mar 22, 2014
There doesn't seem to be a way to specific bounds on generic trait objects (#9265). Neither of these parse: traitFoo<T>{}let _: ~Foo:Freeze<int>;let _: ~Foo<int>:Freeze;This PR is blocked on that issue. |
alexcrichton
commented
Mar 22, 2014
Why is this blocked on that issue? The issue is certainly more pressing, but it would be nice to get off the default bounds as soon as possible. |
huonw
commented
Mar 22, 2014
Because without the new parsing there's literally no way to have a sendable generic trait object; while the current situation just means you're forced to use sendable ones even when a non-sendable one is sufficient. (In any case, the point is moot since you opened #13079.) |
nikomatsakis
commented
Mar 26, 2014
👍 I'm happy to see this, I was just thinking "Oh, I should go implement that by now, might be something I can do in my spare time." Instead, I'll review. :) |
There was a problem hiding this comment.
We have got to change this printout. (not necessarily in this PR)
nikomatsakis
commented
Mar 26, 2014
The changes look good to me. I say r+ pending resolution of @huonw's objection. |
alexcrichton
commented
Mar 26, 2014
@nikomatsakis, @huonw, with #13079 soon-to-land (hopefully!), are you guys ok with this? @nikomatsakis, you may also be interested in #13155 as to why I had to write |
flaper87
commented
Mar 26, 2014
@alexcrichton could you also update the docs? There's a line in the tutorial that says |
alexcrichton
commented
Mar 26, 2014
@flaper87, good catch, I've updated the docs a bit. |
huonw
commented
Mar 27, 2014
r=me with minor docs edits |
This commit removes implicitly adding the Send bound to ~Trait objects and procedure types. It will now be manually required to specify that a procedure or trait must be send-able. Closesrust-lang#10296
This is all purely fallout of getting the previous commit to compile.
See #10296 for the rationale, and commits for the implementation.
Misc refactorings Various small re-orderings to check the HIR tree or AST before doing other checks. Also includes a small bug fix for `arc_with_small_send_sync` not actually checking for `Arc::new`. changelog: none
See #10296 for the rationale, and commits for the implementation.