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

Don't treat closures from other crates as local #106973

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 17, 2023

fixes #104817

r? @lcnr

Specialization can prefer an impl for an opaque type over a blanket impls that also matches. If the blanket impl only applies if an auto-trait applies, we look at the hidden type of the opaque type to see if that implements the auto trait. The hidden type can be a closure or generator, and thus we will end up seeing these types in coherence and have to handle them properly.

@rustbot
Copy link
Collaborator

rustbot commented Jan 17, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @lcnr (or someone else) soon.

Please see the contribution instructions for more information.

@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 Jan 17, 2023
@oli-obk oli-obk force-pushed the tait_ice_closure_in_impl_header branch from f8cc286 to 42f1f54 Compare January 19, 2023 11:30
@oli-obk oli-obk changed the title Hide a delay_span_bug under specialization. Don't treat closures from other crates as local Jan 19, 2023
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 19, 2023

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Jan 19, 2023

📌 Commit 42f1f54 has been approved by lcnr

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 Jan 19, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 20, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#106783 (Recover labels written as identifiers)
 - rust-lang#106973 (Don't treat closures from other crates as local)
 - rust-lang#106979 (Document how to get the type of a default associated type)
 - rust-lang#107053 (signal update string representation for haiku.)
 - rust-lang#107058 (Recognise double-equals homoglyph)
 - rust-lang#107067 (Custom MIR: Support storage statements)
 - rust-lang#107076 (Added const-generic ui test case for issue rust-lang#106419)
 - rust-lang#107091 (Fix broken format strings in `infer.ftl`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 240cc81 into rust-lang:master Jan 20, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 20, 2023
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: ty_is_local invoked on closure or generator
4 participants