]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/borrowed-ptr-pattern-2.rs
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
[rust.git] / src / test / ui / binding / borrowed-ptr-pattern-2.rs
1 // run-pass
2
3 fn foo(s: &String) -> bool {
4     match &**s {
5         "kitty" => true,
6         _ => false
7     }
8 }
9
10 pub fn main() {
11     assert!(foo(&"kitty".to_string()));
12     assert!(!foo(&"gata".to_string()));
13 }