]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-escape-via-trait-or-not.stderr
Auto merge of #65140 - petrochenkov:disapp, r=nikomatsakis
[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            expected &isize
14               found &isize
15 note: but, the lifetime must be valid for the expression at 18:5...
16   --> $DIR/regions-escape-via-trait-or-not.rs:18:5
17    |
18 LL |     with(|o| o)
19    |     ^^^^
20 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
21   --> $DIR/regions-escape-via-trait-or-not.rs:18:5
22    |
23 LL |     with(|o| o)
24    |     ^^^^
25
26 error: aborting due to previous error
27
28 For more information about this error, try `rustc --explain E0495`.