blob: d092dcc7a1963a33037658cb2e12df86162c006a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// { dg-additional-options -frust-mangling=v0 }
#[lang = "sized"]
pub trait Sized {}
#[lang = "fn_once"]
pub trait FnOnce<Args> {
#[lang = "fn_once_output"]
type Output;
extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
}
fn main() {
// { dg-final { scan-assembler "_R.*NC.*NvC.*10v0_mangle24main.*0" } }
let closure_annotated = |i: i32| -> i32 { i + 1 };
let _ = closure_annotated(0) - 1;
}
|