]> git.lizzy.rs Git - rust.git/blob - src/test/ui/abi/issues/issue-22565-rust-call.rs
Auto merge of #80652 - calebzulawski:simd-lanes, r=nagisa
[rust.git] / src / test / ui / abi / issues / issue-22565-rust-call.rs
1 #![feature(unboxed_closures)]
2
3 extern "rust-call" fn b(_i: i32) {}
4 //~^ ERROR functions with the "rust-call" ABI must take a single non-self argument that is a tuple
5
6 trait Tr {
7     extern "rust-call" fn a();
8
9     extern "rust-call" fn b() {}
10     //~^ ERROR functions with the "rust-call" ABI must take a single non-self argument
11 }
12
13 struct Foo;
14
15 impl Foo {
16     extern "rust-call" fn bar() {}
17     //~^ ERROR functions with the "rust-call" ABI must take a single non-self argument
18 }
19
20 impl Tr for Foo {
21     extern "rust-call" fn a() {}
22     //~^ ERROR functions with the "rust-call" ABI must take a single non-self argument
23 }
24
25 fn main () {
26     b(10);
27
28     Foo::bar();
29
30     <Foo as Tr>::a();
31     <Foo as Tr>::b();
32 }