-
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
fix: skip implied bounds if unconstrained lifetime exists #110272
fix: skip implied bounds if unconstrained lifetime exists #110272
Conversation
|
||
// We must avoid processing constrained lifetime variables in implied | ||
// bounds. See #110161 for context. | ||
if ty.needs_infer() { |
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.
I would keep the assertion around for has_non_lifetime_infer
and only delay a span bug if we have infer lifetimes.
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.
I guess type vars has the same problem. For a test case, we can probably replace &'lt ()
by (X,)
in the ui test. I'm not sure though.
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.
fwiw (and I'm completely inexperienced), I think we are good here, there aren't unconstrained type variables in the same way?
@aliemjay Implemented review suggestions. |
@bors r+ rollup=always |
…unds, r=aliemjay fix: skip implied bounds if unconstrained lifetime exists Fixes rust-lang#110161 r? `@aliemjay`
…unds, r=aliemjay fix: skip implied bounds if unconstrained lifetime exists Fixes rust-lang#110161 r? ``@aliemjay``
…unds, r=aliemjay fix: skip implied bounds if unconstrained lifetime exists Fixes rust-lang#110161 r? ```@aliemjay```
Rollup of 8 pull requests Successful merges: - rust-lang#110033 (Add 1.69.0 release notes) - rust-lang#110272 (fix: skip implied bounds if unconstrained lifetime exists) - rust-lang#110307 (Allow everyone to set the beta-nominated label) - rust-lang#110347 (Add intra-doc links to size_of_* functions) - rust-lang#110350 (Add a UI test for rust-lang#79605) - rust-lang#110356 (Fix `x test rust-installer` when `cargo` is set to a relative path) - rust-lang#110364 (remove redundant clones) - rust-lang#110366 (fix some clippy::complexity) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #110161
r? @aliemjay