rust/compiler
Guillaume Gomez 784f04b367
Rollup merge of #117370 - nicholasbishop:bishop-better-c-variadic-errors, r=oli-obk
C-variadic error improvements

A couple improvements for c-variadic errors:

1. Fix the bad-c-variadic error being emitted multiple times. If a function incorrectly contains multiple `...` args, and is also not foreign or `unsafe extern "C"`, only emit the latter error once rather than once per `...`.

2. Explicitly reject `const` C-variadic functions. Trying to use C-variadics in a const function would previously fail with an error like "destructor of `VaListImpl<'_>` cannot be evaluated at compile-time". Add an explicit check for const C-variadics to provide a clearer error: "functions cannot be both `const` and C-variadic". This also addresses one of the concerns in https://github.com/rust-lang/rust/issues/44930: "Ensure that even when this gets stabilized for regular functions, it is still rejected on const fn."
2023-10-30 17:33:17 +01:00
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_arena Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_ast Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_ast_lowering Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser 2023-10-30 17:33:15 +01:00
rustc_ast_passes Rollup merge of #117370 - nicholasbishop:bishop-better-c-variadic-errors, r=oli-obk 2023-10-30 17:33:17 +01:00
rustc_ast_pretty Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_attr Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_baked_icu_data Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_borrowck Rollup merge of #117357 - tmiasko:terminate, r=wesleywiser 2023-10-30 17:33:17 +01:00
rustc_builtin_macros Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_codegen_cranelift Rollup merge of #117317 - RalfJung:track-caller, r=oli-obk 2023-10-30 17:33:16 +01:00
rustc_codegen_gcc Merge commit '09ce29d0591a21e1abae22eac4d41ffd32993af8' into subtree-update_cg_gcc_2023-10-25 2023-10-27 16:07:01 -04:00
rustc_codegen_llvm Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_codegen_ssa Rollup merge of #117317 - RalfJung:track-caller, r=oli-obk 2023-10-30 17:33:16 +01:00
rustc_const_eval Rollup merge of #117317 - RalfJung:track-caller, r=oli-obk 2023-10-30 17:33:16 +01:00
rustc_data_structures Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_driver Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_driver_impl Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_error_codes Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_error_messages Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_errors Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_expand Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_feature Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_fluent_macro Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_fs_util Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_graphviz Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_hir Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_hir_analysis Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_hir_pretty Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser 2023-10-30 17:33:15 +01:00
rustc_hir_typeck Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser 2023-10-30 17:33:15 +01:00
rustc_incremental Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_index Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_infer Rollup merge of #117132 - estebank:issue-80194, r=petrochenkov 2023-10-30 17:33:15 +01:00
rustc_interface Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_lexer Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_lint Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_lint_defs Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_llvm Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_log Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_macros Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_metadata Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_middle Rollup merge of #117357 - tmiasko:terminate, r=wesleywiser 2023-10-30 17:33:17 +01:00
rustc_mir_build Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_mir_dataflow Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_mir_transform Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser 2023-10-30 17:33:15 +01:00
rustc_monomorphize Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_parse Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_parse_format Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_passes Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_plugin_impl Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_privacy Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_query_impl Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_query_system Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_resolve Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_serialize Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_session Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_smir Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_span Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_symbol_mangling Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_target Rollup merge of #117356 - he32:netbsd-mipsel, r=oli-obk 2023-10-30 17:33:16 +01:00
rustc_trait_selection Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser 2023-10-30 17:33:15 +01:00
rustc_traits Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_transmute Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_ty_utils Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser 2023-10-30 17:33:15 +01:00
rustc_type_ir Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
stable_mir Auto merge of #116447 - oli-obk:gen_fn, r=compiler-errors 2023-10-29 00:03:52 +00:00