]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/regions-infer-contravariance-due-to-ret.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / regions-infer-contravariance-due-to-ret.rs
index 46581e4f3d07559123c17254ba6151dcab3b8678..7e328f3bb0354ce453f80f52b913e0dfdb26acf1 100644 (file)
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-struct boxed_int<'self> {
-    f: &'self int,
+struct boxed_int<'a> {
+    f: &'a int,
 }
 
 fn max<'r>(bi: &'r boxed_int, f: &'r int) -> int {
@@ -24,5 +24,5 @@ fn with(bi: &boxed_int) -> int {
 pub fn main() {
     let g = 21;
     let foo = boxed_int { f: &g };
-    assert!(with(&foo) == 22);
+    assert_eq!(with(&foo), 22);
 }