Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
issues
/
issue-3574.rs
blob: 36c1e2ad93ee8cc1ea6585555634927a6749eb0c [
file
] [
log
] [
blame
] [
edit
]
//@ 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"
));
}