-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Better diagnostic for fn items in variadic functions #133538
Conversation
r? @davidtwco rustbot has assigned @davidtwco. Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@rustbot author |
2a13cb6
to
21abd9b
Compare
21abd9b
to
1e4817c
Compare
Now I use the spans as requested. |
@bors r+ |
…iler-errors Better diagnostic for fn items in variadic functions closes rust-lang#69232
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
…iler-errors Better diagnostic for fn items in variadic functions closes rust-lang#69232
…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
…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
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
…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
…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
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
closes #69232