]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-escape-via-trait-or-not.stderr
Rollup merge of #67055 - lqd:const_qualif, r=oli-obk
[rust.git] / src / test / ui / regions / regions-escape-via-trait-or-not.stderr
1 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2   --> $DIR/regions-escape-via-trait-or-not.rs:18:14
3    |
4 LL |     with(|o| o)
5    |              ^
6    |
7 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 18:10...
8   --> $DIR/regions-escape-via-trait-or-not.rs:18:10
9    |
10 LL |     with(|o| o)
11    |          ^^^^^
12 note: ...so that the expression is assignable
13   --> $DIR/regions-escape-via-trait-or-not.rs:18:14
14    |
15 LL |     with(|o| o)
16    |              ^
17    = note: expected  `&isize`
18               found  `&isize`
19 note: but, the lifetime must be valid for the expression at 18:5...
20   --> $DIR/regions-escape-via-trait-or-not.rs:18:5
21    |
22 LL |     with(|o| o)
23    |     ^^^^
24 note: ...so type `fn([closure@$DIR/regions-escape-via-trait-or-not.rs:18:10: 18:15]) -> isize {with::<&isize, [closure@$DIR/regions-escape-via-trait-or-not.rs:18:10: 18:15]>}` of expression is valid during the expression
25   --> $DIR/regions-escape-via-trait-or-not.rs:18:5
26    |
27 LL |     with(|o| o)
28    |     ^^^^
29
30 error: aborting due to previous error
31
32 For more information about this error, try `rustc --explain E0495`.