+error[E0597]: `x` does not live long enough
+ --> $DIR/issue-52534-1.rs:35:5
+ |
+LL | fn foobazbar<'a>(x: u32, y: &'a u32) -> &'a u32 {
+ | -- -- also has lifetime `'a`
+ | |
+ | has lifetime `'a`
+LL | let x = 22;
+LL | &x
+ | ^^ `x` would have to be valid for `'a`
+LL | }
+ | - but `x` will be dropped here, when the function `foobazbar` returns
+ |
+ = help: use data from the highlighted arguments which match the `'a` lifetime of the return type
+ = note: functions cannot return a borrow to data owned within the function's scope, functions can only return borrows to data passed as arguments
+ = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch04-02-references-and-borrowing.html#dangling-references>
+
+error[E0597]: `x` does not live long enough
+ --> $DIR/issue-52534-1.rs:40:5
+ |
+LL | fn foobar<'a>(x: &'a u32) -> &'a u32 {
+ | -- -- also has lifetime `'a`
+ | |
+ | has lifetime `'a`
+LL | let x = 22;
+LL | &x
+ | ^^ `x` would have to be valid for `'a`
+LL | }
+ | - but `x` will be dropped here, when the function `foobar` returns
+ |
+ = help: use data from the highlighted arguments which match the `'a` lifetime of the return type
+ = note: functions cannot return a borrow to data owned within the function's scope, functions can only return borrows to data passed as arguments
+ = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch04-02-references-and-borrowing.html#dangling-references>
+
+error[E0597]: `x` does not live long enough
+ --> $DIR/issue-52534-1.rs:45:5
+ |
+LL | fn foobaz<'a, 'b>(x: &'a u32, y: &'b u32) -> &'a u32 {
+ | -- has lifetime `'a` -- also has lifetime `'a`
+LL | let x = 22;
+LL | &x
+ | ^^ `x` would have to be valid for `'a`
+LL | }
+ | - but `x` will be dropped here, when the function `foobaz` returns
+ |
+ = help: use data from the highlighted arguments which match the `'a` lifetime of the return type
+ = note: functions cannot return a borrow to data owned within the function's scope, functions can only return borrows to data passed as arguments
+ = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch04-02-references-and-borrowing.html#dangling-references>
+
+error[E0597]: `x` does not live long enough
+ --> $DIR/issue-52534-1.rs:50:5
+ |
+LL | fn foobarbaz<'a, 'b>(x: &'a u32, y: &'b u32, z: &'a u32) -> &'a u32 {
+ | -- -- -- also has lifetime `'a`
+ | | |
+ | has lifetime `'a` has lifetime `'a`
+LL | let x = 22;
+LL | &x
+ | ^^ `x` would have to be valid for `'a`
+LL | }
+ | - but `x` will be dropped here, when the function `foobarbaz` returns
+ |
+ = help: use data from the highlighted arguments which match the `'a` lifetime of the return type
+ = note: functions cannot return a borrow to data owned within the function's scope, functions can only return borrows to data passed as arguments
+ = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch04-02-references-and-borrowing.html#dangling-references>
+
+error: aborting due to 8 previous errors