aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2142.rs
blob: a3ec228c0e1279259f1755c00e3f5f7e1ed20aff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[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() {
    let lambda = |&c| c != b'9';

    let a = b'1';
    lambda(&a);
}