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:
commit
9d1b62c109
4 changed files with 52 additions and 11 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue