about summary refs log tree commit diff
path: root/tests/ui/c-variadic/not-async.rs
blob: bdb51a9a43232c0a4e3faac8a5a447ca83c38af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ edition: 2021
#![feature(c_variadic)]
#![crate_type = "lib"]

async unsafe extern "C" fn fn_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

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
}