summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-13665.rs
blob: a3843c65034bca42f5d1ecc44d60f453ded6bdf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass
// pretty-expanded FIXME #23616

fn foo<'r>() {
  let maybe_value_ref: Option<&'r u8> = None;

  let _ = maybe_value_ref.map(|& ref v| v);
  let _ = maybe_value_ref.map(|& ref v| -> &'r u8 {v});
  let _ = maybe_value_ref.map(|& ref v: &'r u8| -> &'r u8 {v});
  let _ = maybe_value_ref.map(|& ref v: &'r u8| {v});
}

fn main() {
  foo();
}