2020-11-11 17:15:39 -06:00
|
|
|
#![feature(unboxed_closures)]
|
|
|
|
|
|
|
|
extern "rust-call" fn b(_i: i32) {}
|
2022-07-30 00:37:48 -05:00
|
|
|
//~^ ERROR functions with the "rust-call" ABI must take a single non-self tuple argument
|
2020-11-11 17:15:39 -06:00
|
|
|
|
2020-12-03 14:53:52 -06:00
|
|
|
trait Tr {
|
|
|
|
extern "rust-call" fn a();
|
2022-07-30 00:37:48 -05:00
|
|
|
//~^ ERROR functions with the "rust-call" ABI must take a single non-self tuple argument
|
2020-12-03 14:53:52 -06:00
|
|
|
|
|
|
|
extern "rust-call" fn b() {}
|
2022-07-30 00:37:48 -05:00
|
|
|
//~^ ERROR functions with the "rust-call" ABI must take a single non-self tuple argument
|
2020-12-03 14:53:52 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
extern "rust-call" fn bar() {}
|
2022-07-30 00:37:48 -05:00
|
|
|
//~^ ERROR functions with the "rust-call" ABI must take a single non-self tuple argument
|
2020-12-03 14:53:52 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Tr for Foo {
|
2020-12-03 18:16:57 -06:00
|
|
|
extern "rust-call" fn a() {}
|
2022-07-30 00:37:48 -05:00
|
|
|
//~^ ERROR functions with the "rust-call" ABI must take a single non-self tuple argument
|
2020-12-03 14:53:52 -06:00
|
|
|
}
|
|
|
|
|
2022-07-30 00:37:48 -05:00
|
|
|
fn main() {
|
2020-11-11 17:15:39 -06:00
|
|
|
b(10);
|
2020-12-03 14:53:52 -06:00
|
|
|
Foo::bar();
|
|
|
|
<Foo as Tr>::a();
|
|
|
|
<Foo as Tr>::b();
|
2020-11-11 17:15:39 -06:00
|
|
|
}
|