1
Fork 0

Rollup merge of #138407 - Bryanskiy:delegation-variadic, r=petrochenkov

Delegation: reject C-variadics

The explanation is contained in attached issues.

Fixes https://github.com/rust-lang/rust/issues/127443
Fixes https://github.com/rust-lang/rust/issues/127413

r? `@petrochenkov`
This commit is contained in:
Manish Goregaokar 2025-03-12 10:19:34 -07:00 committed by GitHub
commit 9d1b62c109
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 52 additions and 11 deletions

View file

@ -409,6 +409,11 @@ fn check_constraints<'tcx>(
emit("recursive delegation is not supported yet");
}
if tcx.fn_sig(sig_id).skip_binder().skip_binder().c_variadic {
// See issue #127443 for explanation.
emit("delegation to C-variadic functions is not allowed");
}
ret
}