Skip to content
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

Merged
merged 3 commits into from
Apr 16, 2023

Conversation

Ezrashaw
Copy link
Contributor

Fixes #110161

r? @aliemjay

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 13, 2023

// We must avoid processing constrained lifetime variables in implied
// bounds. See #110161 for context.
if ty.needs_infer() {
Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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?

@Ezrashaw
Copy link
Contributor Author

@aliemjay Implemented review suggestions.

@aliemjay
Copy link
Member

@bors r+ rollup=always

@bors
Copy link
Contributor

bors commented Apr 15, 2023

📌 Commit 4c80f58 has been approved by aliemjay

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 15, 2023
aliemjay added a commit to aliemjay/rust that referenced this pull request Apr 15, 2023
…unds, r=aliemjay

fix: skip implied bounds if unconstrained lifetime exists

Fixes rust-lang#110161

r? `@aliemjay`
aliemjay added a commit to aliemjay/rust that referenced this pull request Apr 15, 2023
…unds, r=aliemjay

fix: skip implied bounds if unconstrained lifetime exists

Fixes rust-lang#110161

r? ``@aliemjay``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 15, 2023
…unds, r=aliemjay

fix: skip implied bounds if unconstrained lifetime exists

Fixes rust-lang#110161

r? ```@aliemjay```
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2023
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
@bors bors merged commit 52d23c9 into rust-lang:master Apr 16, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 16, 2023
@Ezrashaw Ezrashaw deleted the fix-unconned-lt-in-implbounds branch April 19, 2023 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE assertion failed: !ty.needs_infer()
5 participants