mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
16 lines
353 B
Rust
16 lines
353 B
Rust
//@ 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();
|
|
}
|