rust/src/test/run-pass/issue-3574.rs

19 lines
277 B
Rust
Raw Normal View History

2012-12-06 20:32:13 -06:00
// xfail-test
// rustc --test match_borrowed_str.rs.rs && ./match_borrowed_str.rs
extern mod std;
fn compare(x: &str, y: &str) -> bool
{
match x
{
"foo" => y == "foo",
_ => y == "bar",
}
}
#[test]
fn tester()
{
assert compare("foo", "foo");
}