Better diagnostic for fn items in variadic functions#133538
Merged
bors merged 2 commits intorust-lang:masterfrom Nov 29, 2024
Merged
Better diagnostic for fn items in variadic functions#133538bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Collaborator
|
r? @davidtwco rustbot has assigned @davidtwco. Use |
compiler-errors
suggested changes
Nov 27, 2024
Contributor
compiler-errors
left a comment
There was a problem hiding this comment.
This is not how you coerce a function item to a function pointer. Instead, you've suggested to turn something into a pointer-to-a-fn-item (i.e. a pointer to a ZST). You need to use as fn() to coerce a function item to a function pointer.
Please fix this, and also squash this into one commit.
This comment has been minimized.
This comment has been minimized.
c40651c to
2a13cb6
Compare
Contributor
|
@rustbot author |
2a13cb6 to
21abd9b
Compare
21abd9b to
1e4817c
Compare
Contributor
Author
|
Now I use the spans as requested. |
Contributor
|
@bors r+ |
Collaborator
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Nov 29, 2024
…iler-errors Better diagnostic for fn items in variadic functions closes rust-lang#69232
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2024
Rollup of 7 pull requests Successful merges: - rust-lang#131323 (Support `clobber_abi` in AVR inline assembly) - rust-lang#133092 (Always set the deployment target when building std) - rust-lang#133134 (Don't use a SyntheticProvider for literally every type) - rust-lang#133538 (Better diagnostic for fn items in variadic functions) - rust-lang#133590 (Rename `-Zparse-only`) - rust-lang#133592 (Misc: better instructions for envrc, ignore `/build` instead of `build/`) - rust-lang#133608 (Revert rust-lang#133418 (Store coverage source regions as `Span`) due to regression rust-lang#133606) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 29, 2024
…iler-errors Better diagnostic for fn items in variadic functions closes rust-lang#69232
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#132782 (improvements on initial sysroot and libdir finding logics) - rust-lang#133134 (Don't use a SyntheticProvider for literally every type) - rust-lang#133466 (Fix typos in pin.rs) - rust-lang#133492 (bootstrap: allow skipping steps with start of path) - rust-lang#133501 (support revealing defined opaque post borrowck) - rust-lang#133530 (Use consistent wording in docs, use is zero instead of is 0) - rust-lang#133538 (Better diagnostic for fn items in variadic functions) - rust-lang#133590 (Rename `-Zparse-only`) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#132782 (improvements on initial sysroot and libdir finding logics) - rust-lang#133466 (Fix typos in pin.rs) - rust-lang#133492 (bootstrap: allow skipping steps with start of path) - rust-lang#133501 (support revealing defined opaque post borrowck) - rust-lang#133530 (Use consistent wording in docs, use is zero instead of is 0) - rust-lang#133538 (Better diagnostic for fn items in variadic functions) - rust-lang#133590 (Rename `-Zparse-only`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2024
Rollup merge of rust-lang#133538 - dev-ardi:69232-better-diag, r=compiler-errors Better diagnostic for fn items in variadic functions closes rust-lang#69232
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this pull request
Nov 30, 2024
…to_variadic_function, r=compiler-errors Simplify hir_typeck_pass_to_variadic_function r? `@compiler-errors` This reworks a bit how the diagnostic is generated so that it does the same as rust-lang#133538 The `help` is useless now so I removed it
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this pull request
Nov 30, 2024
…to_variadic_function, r=compiler-errors Simplify hir_typeck_pass_to_variadic_function r? ``@compiler-errors`` This reworks a bit how the diagnostic is generated so that it does the same as rust-lang#133538 The `help` is useless now so I removed it
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 30, 2024
Rollup merge of rust-lang#133620 - dev-ardi:simplify-hir_typeck_pass_to_variadic_function, r=compiler-errors Simplify hir_typeck_pass_to_variadic_function r? ``@compiler-errors`` This reworks a bit how the diagnostic is generated so that it does the same as rust-lang#133538 The `help` is useless now so I removed it
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.
closes #69232