]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-3574.rs
Rollup merge of #107114 - Erk-:add-absolute-note-to-path-join, r=m-ou-se
[rust.git] / tests / ui / issues / issue-3574.rs
1 // run-pass
2 // rustc --test match_borrowed_str.rs.rs && ./match_borrowed_str.rs
3
4
5 fn compare(x: &str, y: &str) -> bool {
6     match x {
7         "foo" => y == "foo",
8         _ => y == "bar",
9     }
10 }
11
12 pub fn main() {
13     assert!(compare("foo", "foo"));
14 }