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

internal: Lower outlive goals, respect them in display impls #16996

Merged
merged 2 commits into from Apr 2, 2024

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Apr 2, 2024

No description provided.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 2, 2024
@Veykril Veykril changed the title Implement LifetimeKind::Error Implement LifetimeKind::Error, respect lifetime bounds Apr 2, 2024
@Veykril Veykril changed the title Implement LifetimeKind::Error, respect lifetime bounds internal: Lower outlive goals, respect them in display impls Apr 2, 2024
Comment on lines +1354 to +1366
lifetime: match lifetime {
Some(it) => match it.bound_var(Interner) {
Some(bound_var) => LifetimeData::BoundVar(BoundVar::new(
DebruijnIndex::INNERMOST,
bound_var.index,
))
.intern(Interner),
None => it,
},
None => static_lifetime(),
},
})
.intern(Interner)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of ugly, not sure if there is a better way (while also avoiding allocations, or iterating twice). We lower all bounds in a with_shifted_in(DebruijnIndex::ONE which isn't correct for the lifetime of the trait object,

@Veykril
Copy link
Member Author

Veykril commented Apr 2, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 2, 2024

📌 Commit 707be6b has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Apr 2, 2024

⌛ Testing commit 707be6b with merge c3b8c2a...

@bors
Copy link
Collaborator

bors commented Apr 2, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing c3b8c2a to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants