Sign in
fuchsia
/
third_party
/
rust
/
0.4
/
.
/
src
/
test
/
run-pass
/
borrowed-ptr-pattern.rs
blob: ae1c955be695652a9f0c63dc965923e7f76050d3 [
file
] [
log
] [
blame
]
fn
foo
<
T
:
Copy
>(
x
:
&
T
)
->
T
{
match
x
{
&
a
=>
a
}
}
fn
main
()
{
assert
foo
(&
3
)
==
3
;
assert
foo
(&
'a'
)
==
'a'
;
assert
foo
(&@
"Dogs rule, cats drool"
)
==
@
"Dogs rule, cats drool"
;
}