Sign in
fuchsia
/
third_party
/
rust
/
f02ffb8b4ca760117875f3b5326e9cff6598dde3
/
.
/
src
/
test
/
ui
/
issues
/
issue-3574.rs
blob: eb967577ffb1aea10dc88e3b7116e21f50403a35 [
file
] [
log
] [
blame
]
// run-pass
// rustc --test match_borrowed_str.rs.rs && ./match_borrowed_str.rs
fn
compare
(
x
:
&
str
,
y
:
&
str
)
->
bool
{
match
x
{
"foo"
=>
y
==
"foo"
,
_
=>
y
==
"bar"
,
}
}
pub
fn
main
()
{
assert
!(
compare
(
"foo"
,
"foo"
));
}