]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/regions-return-interior-of-option.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / regions-return-interior-of-option.rs
index aa4630717db6c63feb058acd7f350d25028abe77..54458f0d0df0330d6ab054e3cc1d7e5da4042f5c 100644 (file)
@@ -8,22 +8,22 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn get<'r, T>(opt: &'r Option<T>) -> &'r T {
+fn get<T>(opt: &Option<T>) -> &T {
     match *opt {
       Some(ref v) => v,
-      None => fail!("none")
+      None => panic!("none")
     }
 }
 
 pub fn main() {
-    let mut x = Some(23);
+    let mut x = Some(23i);
 
     {
         let y = get(&x);
         assert_eq!(*y, 23);
     }
 
-    x = Some(24);
+    x = Some(24i);
 
     {
         let y = get(&x);