about summary refs log tree commit diff
path: root/tests/ui/c-variadic/fn-item-diagnostic-issue-69232.rs
blob: d0ef91b22b234cdb4f102da5db83ec9afa4c149f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// https://github.com/rust-lang/rust/issues/69232

extern "C" {
    fn foo(x: usize, ...);
}

fn test() -> u8 {
    127
}

fn main() {
    unsafe { foo(1, test) }; //~ ERROR can't pass a function item to a variadic function
}