Note closure captures when reporting cast to fn ptr failed#128082
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 23, 2024
Merged
Note closure captures when reporting cast to fn ptr failed#128082bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
Contributor
|
We should extend @bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 23, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#125886 (Migrate run make issue 15460) - rust-lang#126898 (Migrate `run-make/link-framework` to `rmake.rs`) - rust-lang#126994 (Support lists and stylings in more places for `rustc --explain`) - rust-lang#127990 (Migrate `lto-linkage-used-attr`, `no-duplicate-libs` and `pgo-gen-no-imp-symbols` `run-make` tests to rmake) - rust-lang#128060 (Fix inclusion of `wasm-component-ld` in dist artifacts) - rust-lang#128082 (Note closure captures when reporting cast to fn ptr failed) - rust-lang#128098 (make it possible to disable download-rustc if it's incompatible) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 23, 2024
Rollup merge of rust-lang#128082 - compiler-errors:closure-cap, r=estebank Note closure captures when reporting cast to fn ptr failed Fixes rust-lang#128078 We already had logic to point out a closure having captures when that's possibly the source of a coercion error to `fn()`, but we weren't reporting it during an explicit `as` cast.
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.
Fixes #128078
We already had logic to point out a closure having captures when that's possibly the source of a coercion error to
fn(), but we weren't reporting it during an explicitascast.