]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/region-object-lifetime-2.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / regions / region-object-lifetime-2.stderr
1 error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
2 --> $DIR/region-object-lifetime-2.rs:20:7
3 |
4 LL | x.borrowed() //~ ERROR cannot infer
5 | ^^^^^^^^
6 |
7 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 19:42...
8 --> $DIR/region-object-lifetime-2.rs:19:42
9 |
10 LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () {
11 | ^^
12 note: ...so that reference does not outlive borrowed content
13 --> $DIR/region-object-lifetime-2.rs:20:5
14 |
15 LL | x.borrowed() //~ ERROR cannot infer
16 | ^
17 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 19:45...
18 --> $DIR/region-object-lifetime-2.rs:19:45
19 |
20 LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () {
21 | ^^
22 note: ...so that reference does not outlive borrowed content
23 --> $DIR/region-object-lifetime-2.rs:20:5
24 |
25 LL | x.borrowed() //~ ERROR cannot infer
26 | ^^^^^^^^^^^^
27
28 error: aborting due to previous error
29
30 For more information about this error, try `rustc --explain E0495`.