rust/tests/ui/abi/issues/issue-22565-rust-call.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
809 B
Rust
Raw Normal View History

#![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
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
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
}
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
}
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
}
2022-07-30 00:37:48 -05:00
fn main() {
b(10);
Foo::bar();
<Foo as Tr>::a();
<Foo as Tr>::b();
}