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