]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-3574.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / 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 }