2020-11-11 23:15:39 +00:00
|
|
|
#![feature(unboxed_closures)]
|
|
|
|
|
|
|
|
extern "rust-call" fn b(_i: i32) {}
|
|
|
|
//~^ ERROR A function with the "rust-call" ABI must take a single non-self argument that is a tuple
|
|
|
|
|
2020-12-03 20:53:52 +00:00
|
|
|
trait Tr {
|
|
|
|
extern "rust-call" fn a();
|
|
|
|
//~^ ERROR A function with the "rust-call" ABI must take a single non-self argument
|
|
|
|
|
|
|
|
extern "rust-call" fn b() {}
|
|
|
|
//~^ ERROR A function with the "rust-call" ABI must take a single non-self argument
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
extern "rust-call" fn bar() {}
|
|
|
|
//~^ ERROR A function with the "rust-call" ABI must take a single non-self argument
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Tr for Foo {
|
|
|
|
fn a() {}
|
|
|
|
//~^ ERROR A function with the "rust-call" ABI must take a single non-self argument
|
|
|
|
}
|
|
|
|
|
2020-11-11 23:15:39 +00:00
|
|
|
fn main () {
|
|
|
|
b(10);
|
2020-12-03 20:53:52 +00:00
|
|
|
|
|
|
|
Foo::bar();
|
|
|
|
|
|
|
|
<Foo as Tr>::a();
|
|
|
|
<Foo as Tr>::b();
|
2020-11-11 23:15:39 +00:00
|
|
|
}
|