Uh oh!
There was an error while loading. Please reload this page.
Make GATs object safe under generic_associated_types_extended feature - #94911
Conversation
This comment has been minimized.
This comment has been minimized.
bors
commented
Mar 25, 2022
☔ The latest upstream changes (presumably #95291) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
these changes look good -- the logic you're using to create new bound vars for the GATs is inspired from #87900, right?
r=me once the parent PR lands (and you rebase that first commit out)
There was a problem hiding this comment.
I was going to say that this should also deny GATs with type parameters, but it seems we already disallow those elsewhere: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1af97ded49aa74d43f72f0c3b70658e9
bors
commented
Mar 31, 2022
☔ The latest upstream changes (presumably #95501) made this pull request unmergeable. Please resolve the merge conflicts. |
jackh726
commented
Apr 1, 2022
@bors r=compiler-errors |
bors
commented
Apr 1, 2022
📌 Commit d3fe28b has been approved by |
…r-errors Make GATs object safe under generic_associated_types_extended feature Based on rust-lang#94869 Let's say we have ```rust trait StreamingIterator { type Item<'a> where Self: 'a; } ``` And `dyn for<'a> StreamingIterator<Item<'a> = &'a i32>`. If we ask `(dyn for<'a> StreamingIterator<Item<'a> = &'a i32>): StreamingIterator`, then we have to prove that `for<'x> (&'x i32): Sized`. So, we generate *new* bound vars to subst for the GAT generics. Importantly, this doesn't fully verify that these are usable and sound. r? `@nikomatsakis`
Dylan-DPC
commented
Apr 2, 2022
compiler-errors
commented
Apr 2, 2022
NLL strikes again... |
jackh726
commented
Apr 2, 2022
@bors r=compiler-errors |
bors
commented
Apr 2, 2022
📌 Commit 52b00db has been approved by |
bors
commented
Apr 2, 2022
bors
commented
Apr 2, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Apr 2, 2022
Finished benchmarking commit (8f96ef4): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Based on #94869
Let's say we have
And
dyn for<'a> StreamingIterator<Item<'a> = &'a i32>.If we ask
(dyn for<'a> StreamingIterator<Item<'a> = &'a i32>): StreamingIterator, then we have to prove thatfor<'x> (&'x i32): Sized. So, we generate new bound vars to subst for the GAT generics.Importantly, this doesn't fully verify that these are usable and sound.
r? @nikomatsakis