]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-3574.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / issue-3574.rs
index b3b610b91a799a90a274babeefd22fc11e356b55..e31f2ade125eb08d284bb47b53152b4244089a90 100644 (file)
@@ -8,21 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[allow(unnecessary_allocation)];
-
 // rustc --test match_borrowed_str.rs.rs && ./match_borrowed_str.rs
 
-fn compare(x: &str, y: &str) -> bool
-{
-    match x
-    {
+fn compare(x: &str, y: &str) -> bool {
+    match x {
         "foo" => y == "foo",
         _ => y == "bar",
     }
 }
 
-pub fn main()
-{
+pub fn main() {
     assert!(compare("foo", "foo"));
-    assert!(compare(~"foo", ~"foo"));
 }