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