2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2014-10-02 21:52:06 +02:00
|
|
|
struct A {
|
|
|
|
a: String
|
|
|
|
}
|
|
|
|
|
|
|
|
fn borrow<'a>(binding: &'a A) -> &'a str {
|
2015-02-01 21:53:25 -05:00
|
|
|
match &*binding.a {
|
2014-10-02 21:52:06 +02:00
|
|
|
"in" => "in_",
|
|
|
|
"ref" => "ref_",
|
|
|
|
ident => ident
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|