2025-09-06 15:00:19 +02:00
|
|
|
//@ edition: 2021
|
|
|
|
|
#![feature(c_variadic)]
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
2025-09-10 00:17:22 +02:00
|
|
|
async unsafe extern "C" fn fn_cannot_be_async(x: isize, ...) {}
|
2025-09-06 15:00:19 +02:00
|
|
|
//~^ ERROR functions cannot be both `async` and C-variadic
|
|
|
|
|
//~| ERROR hidden type for `impl Future<Output = ()>` captures lifetime that does not appear in bounds
|
2025-09-10 00:17:22 +02:00
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
|
|
impl S {
|
|
|
|
|
async unsafe extern "C" fn method_cannot_be_async(x: isize, ...) {}
|
|
|
|
|
//~^ ERROR functions cannot be both `async` and C-variadic
|
|
|
|
|
//~| ERROR hidden type for `impl Future<Output = ()>` captures lifetime that does not appear in bounds
|
|
|
|
|
}
|