]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-ret-borrowed-1.base.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-ret-borrowed-1.base.stderr
1 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2 --> $DIR/regions-ret-borrowed-1.rs:14:14
3 |
4 LL | with(|o| o)
5 | ^
6 |
7 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined here...
8 --> $DIR/regions-ret-borrowed-1.rs:14:10
9 |
10 LL | with(|o| o)
11 | ^^^^^
12 note: ...so that the types are compatible
13 --> $DIR/regions-ret-borrowed-1.rs:14: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 lifetime `'a` as defined here...
20 --> $DIR/regions-ret-borrowed-1.rs:13:14
21 |
22 LL | fn return_it<'a>() -> &'a isize {
23 | ^^
24 note: ...so that reference does not outlive borrowed content
25 --> $DIR/regions-ret-borrowed-1.rs:14: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`.