diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-10-30 17:33:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-30 17:33:17 +0100 |
| commit | 784f04b36751c0659292ab4f372105b4eab96331 (patch) | |
| tree | d941492f18e69a9fd85348bd29de13d5a19bd95e /tests/coverage/overflow.rs | |
| parent | 5ac999f1339adedd359eca1e0f5425fa63ee624a (diff) | |
| parent | f91b5ceaf2568c38afc5a4b7c82459ca3d857998 (diff) | |
| download | rust-784f04b36751c0659292ab4f372105b4eab96331.tar.gz rust-784f04b36751c0659292ab4f372105b4eab96331.zip | |
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."
Diffstat (limited to 'tests/coverage/overflow.rs')
0 files changed, 0 insertions, 0 deletions
