Normalize closure instance before eagerly monomorphizing it#137035
Merged
bors merged 1 commit intorust-lang:masterfrom Feb 15, 2025
Merged
Normalize closure instance before eagerly monomorphizing it#137035bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
Author
|
Not sure if we should backport this, since 1.86 branches today (afaict). We could also just disable this eager norm behavior on beta. Or just ignore it, bc |
compiler-errors
commented
Feb 14, 2025
| } | ||
| _ => unreachable!(), | ||
| }; | ||
| let Ok(instance) = self.tcx.try_normalize_erasing_regions( |
Contributor
Author
There was a problem hiding this comment.
this code is unnecessarily defensive but i'd rather not turn this into an ICE with an impossible-to-normalize opaque type or something.
compiler-errors
commented
Feb 14, 2025
saethlin
reviewed
Feb 14, 2025
71d4523 to
2ada9cc
Compare
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 15, 2025
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#133312 (triagebot: automatically add more rustdoc related labels) - rust-lang#134016 (Stabilize `const_is_char_boundary` and `const_str_split_at`.) - rust-lang#136971 (Add a new check-pass UI test for returning `impl Fn(T) -> impl Trait`) - rust-lang#136983 (Prepare standard library for Rust 2024 migration) - rust-lang#137002 (Fix early lint check desc in query) - rust-lang#137006 (borrowck diagnostics cleanup: remove an unused and a barely-used field) - rust-lang#137032 (Decode metadata buffer in one go) - rust-lang#137035 (Normalize closure instance before eagerly monomorphizing it) - rust-lang#137037 (add x86-sse2 (32bit) ABI that requires SSE2 target feature) - rust-lang#137038 (llvm: Tolerate captures in tests) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 15, 2025
Rollup merge of rust-lang#137035 - compiler-errors:eagerly-mono-closures-after-norm, r=saethlin Normalize closure instance before eagerly monomorphizing it We were monomorphizing two versions of the closure (or in the original issue, coroutine) -- one with normalized captures and one with unnormalized captures. This led to a symbol collision. Fixes rust-lang#137009 r? `@saethlin` or reassign
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were monomorphizing two versions of the closure (or in the original issue, coroutine) -- one with normalized captures and one with unnormalized captures. This led to a symbol collision.
Fixes #137009
r? @saethlin or reassign