-
Notifications
You must be signed in to change notification settings - Fork 13.4k
New "lifetime bound not satisfied" error on associated type #117664
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Running searched nightlies: from nightly-2023-11-03 to nightly-2023-11-07 bisected with cargo-bisect-rustc v0.6.7Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc -- check |
@rustbot label -regression-untriaged regression-from-stable-to-nightly |
With #117542 merged, I believe this issue has been resolved? I am no longer able to reproduce the error on the latest nightly ( |
@laurmaedje can you confirm the above comment? That is, is this issue fixed for you, too? Thanks |
Yes, it's resolved for me. Thanks! |
Code
I tried this code:
I expected to see this happen: Compiles.
Instead, this happened: Fails with:
The whole setup with the default type parameter that is overridden is required to get
Tracked
to be covariant over the constraint. The code above is a minimal extract from a usage ofcomemo
intypst
. Linked issue: typst/typst#2600See also this discussion on Zulip for how this setup came to be in the first place: https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.E2.9C.94.20Variance.20with.20associated.20types
Version it worked on
It most recently worked on:
Version with regression
The text was updated successfully, but these errors were encountered: