Files
rust/tests/ui/c-variadic/not-async.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
557 B
Rust
Raw Permalink Normal View History

2025-09-06 15:00:19 +02:00
//@ edition: 2021
#![feature(c_variadic)]
#![crate_type = "lib"]
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
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
}