fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
863 B27 linesraw
1error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2  --> $DIR/regions-ret-borrowed.rs:13:14
3   |
4LL |     with(|o| o)
5   |              ^
6   |
7note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 13:10...
8  --> $DIR/regions-ret-borrowed.rs:13:10
9   |
10LL |     with(|o| o)
11   |          ^^^^^
12   = note: ...so that the expression is assignable:
13           expected &isize
14              found &isize
15note: but, the lifetime must be valid for the lifetime 'a as defined on the function body at 12:14...
16  --> $DIR/regions-ret-borrowed.rs:12:14
17   |
18LL | fn return_it<'a>() -> &'a isize {
19   |              ^^
20note: ...so that reference does not outlive borrowed content
21  --> $DIR/regions-ret-borrowed.rs:13:5
22   |
23LL |     with(|o| o)
24   |     ^^^^^^^^^^^
25
26error: aborting due to previous error
27