2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2014-12-22 23:20:31 -06:00
|
|
|
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();
|
|
|
|
}
|