-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Not compiling after adding the GAT Self: 'a
bounds
#90808
Comments
@rustbot ping cleanup It would be really nice to get a minimal test for this. The intent for this lint was that in theory, existing code shouldn't break. So, either we need to update the outlives lint code to not error here or decide that this pattern isn't correct and we should figure out the correct fix and make sure it's documented. |
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good cc @AminArria @ayazhafiz @camelid @chrissimpkins @contrun @elshize @h-michael @HallerPatrick @hdhoang @hellow554 @henryboisdequin @imtsuki @JamesPatrickGill @kanru @KarlK90 @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @shekohex @sinato @smmalis37 @steffahn @Stupremee @tamuhey @turboladen @woshilapin @yerke |
For clarification, the most ideal MCVE would be of the code at this commit. |
This issue might be related. |
I am almost certain that this bug has to do with this line: - type Cost<'a> = MP::Cost<'a>;
+ type Cost<'a> where Self: 'a = MP::Cost<'a>; The problem does not occur when the following change is applied before the - type Cost<'a> = MP::Cost<'a>;
+ type Cost<'a> = MP::Cost<'provider>; On this branch, I applied the commits of this branch (where the original issue occured) in a different order. After starting with the commit above, I remove a few ugly HRTB's in an intermediate commit. After that, adding the |
@vandenheuvel were you able to fix your project and also include the required bounds? |
GATs issue triage: not blocking. It's really not clear what an actionable path forward here is. It would be nice to know what exactly led to these problems, but I can't see anything that changes the outlives lint rules. We also have the flexibility in the future to make the outlives lint more lenient. |
I'm going to go ahead and close this. As said in previous comment, not sure what is actionable here. |
After #89970 was merged, project relp no longer compiled as expected: I needed to add a few
Self: 'a
bounds.After I did just that, I was left with the following error:
After I made the following change:
cargo build
succeeded.The core of this bug report is the question why the extra change above could have been necessary, as #89970 should not have influenced that.
Summarized from a private conversation with @jackh726.
The text was updated successfully, but these errors were encountered: