]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/lub-match.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / compile-fail / lub-match.rs
index 1b5824964a8eb53b44a45bd5a82fb43af5e0bdc4..b9423feb5c1cde561d8f586ad7a132cf4073c953 100644 (file)
@@ -37,8 +37,7 @@ pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
         None => "(none)",
         Some(ref s) => {
             let s: &'a str = s;
-            s
-            //~^ ERROR cannot infer an appropriate lifetime
+            s //~ ERROR E0312
         }
     }
 }
@@ -47,8 +46,7 @@ pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
     match *maybestr {
         Some(ref s) => {
             let s: &'a str = s;
-            s
-            //~^ ERROR cannot infer an appropriate lifetime
+            s //~ ERROR E0312
         }
         None => "(none)",
     }