gccrs: Handle `async` functions in traits
[official-gcc.git] / gcc / testsuite / rust / compile / v0-mangle2.rs
blobd092dcc7a1963a33037658cb2e12df86162c006a
1 // { dg-additional-options -frust-mangling=v0 }
2 #[lang = "sized"]
3 pub trait Sized {}
5 #[lang = "fn_once"]
6 pub trait FnOnce<Args> {
7     #[lang = "fn_once_output"]
8     type Output;
10     extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
13 fn main() {
14     // { dg-final { scan-assembler "_R.*NC.*NvC.*10v0_mangle24main.*0" } }
15     let closure_annotated = |i: i32| -> i32 { i + 1 };
16     let _ = closure_annotated(0) - 1;