]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/lub-if.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / lub-if.nll.stderr
index a34e280bfa6013054333d030205a41eea0c694bd..2405e30a8cd005db3a69bab6c1b20eedac7bbcc1 100644 (file)
@@ -1,30 +1,20 @@
-warning: not reporting region error due to nll
-  --> $DIR/lub-if.rs:38:9
-   |
-LL |         s  //~ ERROR E0312
-   |         ^
-
-warning: not reporting region error due to nll
-  --> $DIR/lub-if.rs:45:9
-   |
-LL |         s  //~ ERROR E0312
-   |         ^
-
 error: unsatisfied lifetime constraints
-  --> $DIR/lub-if.rs:34:8
+  --> $DIR/lub-if.rs:38:9
    |
 LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
    |                 -- lifetime `'a` defined here
-LL |     if maybestr.is_none() {
-   |        ^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+...
+LL |         s  //~ ERROR E0312
+   |         ^ returning this value requires that `'a` must outlive `'static`
 
 error: unsatisfied lifetime constraints
-  --> $DIR/lub-if.rs:43:8
+  --> $DIR/lub-if.rs:45:9
    |
 LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
    |                 -- lifetime `'a` defined here
-LL |     if maybestr.is_some() {
-   |        ^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+...
+LL |         s  //~ ERROR E0312
+   |         ^ returning this value requires that `'a` must outlive `'static`
 
 error: aborting due to 2 previous errors