fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
954 B32 linesraw
1error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2  --> $DIR/regions-escape-method.rs:15:13
3   |
4LL |     s.f(|p| p)
5   |             ^
6   |
7note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 15:9...
8  --> $DIR/regions-escape-method.rs:15:9
9   |
10LL |     s.f(|p| p)
11   |         ^^^^^
12note: ...so that the expression is assignable
13  --> $DIR/regions-escape-method.rs:15:13
14   |
15LL |     s.f(|p| p)
16   |             ^
17   = note: expected  `&i32`
18              found  `&i32`
19note: but, the lifetime must be valid for the method call at 15:5...
20  --> $DIR/regions-escape-method.rs:15:5
21   |
22LL |     s.f(|p| p)
23   |     ^^^^^^^^^^
24note: ...so that a type/lifetime parameter is in scope here
25  --> $DIR/regions-escape-method.rs:15:5
26   |
27LL |     s.f(|p| p)
28   |     ^^^^^^^^^^
29
30error: aborting due to previous error
31
32For more information about this error, try `rustc --explain E0495`.