-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require assoc types to outlive struct they are referenced from #22436
Require assoc types to outlive struct they are referenced from #22436
Conversation
c8406d6
to
4f461aa
Compare
@bors r=4f461aa |
🙀 You have the wrong number! Please try again with |
@bors r+ 4f461aa |
@bors: p=1 (this is blocking an important library stabilzation PR) |
⌛ Testing commit 4f461aa with merge a84505e... |
💔 Test failed - auto-mac-64-opt |
`no_late_bound_regions().unwrap()`, which allows us to write code that doesn't necessarily *fail* when there are higher-ranked trait bounds.
parameter environments so that it can be used elsewhere.
that it produces "outlives" relations for associated types. Add several tests relating to rust-lang#22246.
4f461aa
to
9bb3b37
Compare
@bors r+ 9bb3b37 p=1 as this is blocking aturon |
⌛ Testing commit 9bb3b37 with merge 4fe222e... |
💔 Test failed - auto-win-32-nopt-t |
@bors: retry |
⌛ Testing commit 9bb3b37 with merge 2299235... |
…soc-types, r=nikomatsakis Take 2. This PR includes a bunch of refactoring that was part of an experimental branch implementing [implied bounds]. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing #22246. The implied bounds branch also exposed #22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs. I patched the two issues I was concerned about, which was the handling of supertraits and HRTB (the latter turned out to be fine, so I added a comment explaining why.) r? @pnkfelix (for now, anyway) cc @aturon [implied bounds]: http://smallcultfollowing.com/babysteps/blog/2014/07/06/implied-bounds/
…imes-of-assoc-types Take 2. This PR includes a bunch of refactoring that was part of an experimental branch implementing [implied bounds]. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing rust-lang#22246. The implied bounds branch also exposed rust-lang#22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs. I patched the two issues I was concerned about, which was the handling of supertraits and HRTB (the latter turned out to be fine, so I added a comment explaining why.) r? @pnkfelix (for now, anyway) cc @aturon [implied bounds]: http://smallcultfollowing.com/babysteps/blog/2014/07/06/implied-bounds/
PR rust-lang#22436 has fixed it. Closes rust-lang#22356
PR rust-lang#22436 has fixed it. Closes rust-lang#22356
Take 2. This PR includes a bunch of refactoring that was part of an experimental branch implementing implied bounds. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing #22246. The implied bounds branch also exposed #22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs. I patched the two issues I was concerned about, which was the handling of supertraits and HRTB (the latter turned out to be fine, so I added a comment explaining why.)
r? @pnkfelix (for now, anyway)
cc @aturon