-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Capture all lifetimes for TAITs and impl trait in associated types #114616
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me on impl
Also, it may be useful to cherry-pick ba07937b29b0381a4aa8307c9b45d98d5348ca02 (deleting the RPITIT-specific test) and add some variance tests for TAITs. something like: #![rustc_variance_of_opaques]
type Foo<'a, 'b: 'b, T> = impl Sized; //~ ERROR [o, o, o] |
…r=oli-obk Make RPITITs capture all in-scope lifetimes Much like rust-lang#114616, this implements the lang team decision from this T-lang meeting on [opaque captures strategy moving forward](https://hackmd.io/sFaSIMJOQcuwCdnUvCxtuQ?view). This will be RFC'd soon, but given that RPITITs are a nightly feature, this shouldn't necessarily be blocked on that. We unconditionally capture all lifetimes in RPITITs -- impl is not as simple as rust-lang#114616, since we still need to duplicate RPIT lifetimes to make sure we reify any late-bound lifetimes in scope. Closes rust-lang#112194
81c1cc7
to
e82ccd5
Compare
@bors r=compiler-errors |
☀️ Test successful - checks-actions |
Finished benchmarking commit (ac02e40): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 631.943s -> 632.335s (0.06%) |
This reverts commit cb94675, reversing changes made to 57781b2. (This is only true for the tests, the change itself was done from scratch, as the compiler has diverged sufficiently for a revert to not make sense anymore).
This implements the lang team decision from this meeting: https://hackmd.io/sFaSIMJOQcuwCdnUvCxtuQ?view
r? @cjgillot on the impl