aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/execute/torture/ref-pattern2.rs
blob: 8e7172406c470625d52ce372353bc85af26a7d53 (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() -> i32 {
  let foo = |&&d: &&i32| -> i32 { d };

  let x = &&5i32;
  foo(x) - 5
}