1

Don't use `hir_ty_to_ty` in `result_large_err` by Jarcho · Pull Request #9417 ·...

 2 years ago
source link: https://github.com/rust-lang/rust-clippy/pull/9417
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Don't use hir_ty_to_ty in result_large_err #9417

Conversation

Contributor

@Jarcho Jarcho commented 6 days ago

fixes #9414

This occurs starting with 2022-09-01. I checked that this does fix the ICE on rust-lang/rust@9353538. Not sure which pr caused the late-bound region to leak through hir_ty_to_ty.

changelog: None

All reactions

Collaborator

rust-highfive commented 6 days ago

r? @Alexendoo

(rust-highfive has picked a reviewer for you, use r? to override)

rust-highfive

added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label

6 days ago

Member

Alexendoo commented 6 days ago

Ah damn, I thought about suggesting to replace the hir_ty_to_ty in #9373 but left it as it wasn't a new addition

Thanks!

@bors r+

Contributor

bors commented 6 days ago

pushpin Commit bd70ccf has been approved by Alexendoo

It is now in the queue for this repository.

Contributor

bors commented 6 days ago

hourglass Testing commit bd70ccf with merge 958a9cf...

bors

merged commit 958a9cf into

rust-lang:master

6 days ago

5 checks passed

Contributor

lukaslueg commented 6 days ago

@Jarcho, @Alexendoo If you could, maybe you have two hints about what had been wrong in the original PR?

Contributor

Author

Jarcho commented 6 days ago

edited

The error is from a change on rustc's side. hir_ty_to_ty isn't erasing the lifetime bounds on trait objects in some cases so you're left with a type like for<'a> (dyn 'a + Trait) and such a type can't be used when computing layouts. The old type would have been (dyn 'erased Trait) (not real syntax) which is a way of saying to ignore the lifetime value as it doesn't matter.

Alexendoo

added the beta-nominated Nominated for backporting to the compiler in the beta channel. label

2 days ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels
beta-nominated Nominated for backporting to the compiler in the beta channel. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK