Uh oh!
There was an error while loading. Please reload this page.
Fix checking of auto trait bounds in trait objects. - #45772
Conversation
Any auto trait is allowed in trait object bounds. Fix duplicate check of type and lifetime parameter count.
rust-highfive
commented
Nov 5, 2017
(rust_highfive has picked a reviewer for you, use r? to override) |
| } else { | ||
| false | ||
| } | ||
| Def::Trait(trait_did) if tcx.trait_is_auto(trait_did) => { |
There was a problem hiding this comment.
In principle we could easily extend this to arbitrary marker traits, I suppose?
Oh, I guess that's annoying, for same reason as before. Forgive me, old habits die hard. =) |
nikomatsakis
commented
Nov 6, 2017
OK -- thought this over. I don't think extending to arbitrary marker traits is something we can do without an RFC. But auto traits should be ok, since defining new auto traits is still unstable. |
nikomatsakis
commented
Nov 6, 2017
Well, there are a few auto traits that are stable and are not |
nikomatsakis
commented
Nov 6, 2017
@bors fcp merge I'd like to propose that we merge this PR. It has the effect of enabling trait objects with arbitrary auto traits composed together. So, whereas before you could only do I don't feel an RFC is needed for this particular PR. However, to go further and support composition of arbitrary object-safe traits, I would like to have an RFC. This is not because I expect us to be against the basic idea, but just because there are various approaches we might take (e.g., I favor multiple vtables, but a case can be made for a single composed vtable) and I think it would benefit from a proper design cycle. The change as implemented is "insta-stable". If we wanted, we could also make arbitrary extensions to the capabilities here, but require a feature-gate to go beyond |
leoyvens
commented
Nov 6, 2017
@nikomatsakis I think you meant to invoke @rfcbot. |
withoutboats
commented
Nov 6, 2017
@rfcbot fcp merge |
Team member @withoutboats has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
eddyb
commented
Nov 6, 2017
Wait, what's the explanation here? |
leoyvens
commented
Nov 6, 2017
@eddyb If we do it I imagine that when the |
eddyb
commented
Nov 6, 2017
@leodasvacas But that's standard procedure - whoever updates the bootstrap compiler removes all the |
leoyvens
commented
Nov 6, 2017
@eddyb Ah, I was ignorant on the process here. I'll do it then. |
cramertj
commented
Nov 6, 2017
@rfcbot reviewed |
It's completely unused.
leoyvens
commented
Nov 7, 2017
Removed the |
rfcbot
commented
Nov 9, 2017
🔔 This is now entering its final comment period, as per the review above. 🔔 |
nikomatsakis
commented
Nov 9, 2017
@bors r+ |
bors
commented
Nov 9, 2017
📌 Commit 7995f87 has been approved by |
nikomatsakis
commented
Nov 9, 2017
@bors r- |
nikomatsakis
commented
Nov 9, 2017
Guess I should show some decorum and wait a bit for FCP. |
nikomatsakis
commented
Nov 10, 2017
@bors r+ I'm impatient. We can always back it out if something dramatic comes up. |
bors
commented
Nov 10, 2017
📌 Commit 7995f87 has been approved by |
bors
commented
Nov 11, 2017
⌛ Testing commit 7995f87 with merge e33731286e7e57b67375218bb3024caa93d4a530... |
bors
commented
Nov 11, 2017
💔 Test failed - status-travis |
kennytm
commented
Nov 11, 2017
@bors retry Details |
bors
commented
Nov 11, 2017
…r=nikomatsakis Fix checking of auto trait bounds in trait objects. Any auto trait is allowed in trait object bounds. Fix duplicate check of type and lifetime parameter count, which we were [emitting twice](https://play.rust-lang.org/?gist=37dbbdbbec62dec423bb8f6d92f137cc&version=stable). Note: This was the last use of `Send` in the compiler, meaning after a new `stage0` we could remove the `send` lang item.
bors
commented
Nov 11, 2017
💔 Test failed - status-travis |
kennytm
commented
Nov 11, 2017
@bors retry
|
bors
commented
Nov 11, 2017
…r=nikomatsakis Fix checking of auto trait bounds in trait objects. Any auto trait is allowed in trait object bounds. Fix duplicate check of type and lifetime parameter count, which we were [emitting twice](https://play.rust-lang.org/?gist=37dbbdbbec62dec423bb8f6d92f137cc&version=stable). Note: This was the last use of `Send` in the compiler, meaning after a new `stage0` we could remove the `send` lang item.
bors
commented
Nov 11, 2017
☀️ Test successful - status-appveyor, status-travis |
leoyvens
commented
Nov 13, 2017
@gbutler69 It was removed because it was no longer in use. Keeping lang items to a minimal is good. |
Any auto trait is allowed in trait object bounds. Fix duplicate check of type and lifetime parameter count, which we were emitting twice.
Note: This was the last use of
Sendin the compiler, meaning after a newstage0we could remove thesendlang item.