1
Fork 0

Allow "C-unwind" fn to have C variadics

This commit is contained in:
Jubilee Young 2024-06-22 14:42:26 -07:00
parent a0f01c3c10
commit 26dccadb47
3 changed files with 10 additions and 0 deletions

View file

@ -637,6 +637,7 @@ impl<'a> AstValidator<'a> {
(Some(FnCtxt::Foreign), _) => return,
(Some(FnCtxt::Free), Some(header)) => match header.ext {
Extern::Explicit(StrLit { symbol_unescaped: sym::C, .. }, _)
| Extern::Explicit(StrLit { symbol_unescaped: sym::C_dash_unwind, .. }, _)
| Extern::Implicit(_)
if matches!(header.safety, Safety::Unsafe(_)) =>
{