error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:19:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | }; | - borrowed value only lives until here error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:19:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | }; | - borrowed value only lives until here error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:34:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | }; | - borrowed value only lives until here error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:34:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | }; | - borrowed value only lives until here error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:65:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | }; | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 64:5... --> $DIR/region-borrow-params-issue-29793-small.rs:64:5 | LL | fn g<'a>(x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:65:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | }; | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 64:5... --> $DIR/region-borrow-params-issue-29793-small.rs:64:5 | LL | fn g<'a>(x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:76:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | }; | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 75:5... --> $DIR/region-borrow-params-issue-29793-small.rs:75:5 | LL | fn g<'a>(x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:76:17 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | }; | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 75:5... --> $DIR/region-borrow-params-issue-29793-small.rs:75:5 | LL | fn g<'a>(x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:100:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 99:9... --> $DIR/region-borrow-params-issue-29793-small.rs:99:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:100:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 99:9... --> $DIR/region-borrow-params-issue-29793-small.rs:99:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:114:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 113:9... --> $DIR/region-borrow-params-issue-29793-small.rs:113:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:114:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 113:9... --> $DIR/region-borrow-params-issue-29793-small.rs:113:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:142:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 141:9... --> $DIR/region-borrow-params-issue-29793-small.rs:141:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:142:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 141:9... --> $DIR/region-borrow-params-issue-29793-small.rs:141:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:157:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 156:9... --> $DIR/region-borrow-params-issue-29793-small.rs:156:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:157:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 156:9... --> $DIR/region-borrow-params-issue-29793-small.rs:156:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:185:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 184:9... --> $DIR/region-borrow-params-issue-29793-small.rs:184:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:185:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 184:9... --> $DIR/region-borrow-params-issue-29793-small.rs:184:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `x` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:199:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 198:9... --> $DIR/region-borrow-params-issue-29793-small.rs:198:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0597]: `y` does not live long enough --> $DIR/region-borrow-params-issue-29793-small.rs:199:21 | LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough ... LL | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the method body at 198:9... --> $DIR/region-borrow-params-issue-29793-small.rs:198:9 | LL | fn g<'a>(&self, x: usize, y:usize) -> Box usize + 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 20 previous errors For more information about this error, try `rustc --explain E0597`.