]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-55796.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-55796.stderr
1 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2 --> $DIR/issue-55796.rs:16:9
3 |
4 LL | Box::new(self.out_edges(u).map(|e| e.target()))
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 5:17...
8 --> $DIR/issue-55796.rs:5:17
9 |
10 LL | pub trait Graph<'a> {
11 | ^^
12 note: ...so that the type `std::iter::Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:16:40: 16:54]>` will meet its required lifetime bounds
13 --> $DIR/issue-55796.rs:16:9
14 |
15 LL | Box::new(self.out_edges(u).map(|e| e.target()))
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 = note: but, the lifetime must be valid for the static lifetime...
18 note: ...so that the expression is assignable
19 --> $DIR/issue-55796.rs:16:9
20 |
21 LL | Box::new(self.out_edges(u).map(|e| e.target()))
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 = note: expected `std::boxed::Box<(dyn std::iter::Iterator<Item = <Self as Graph<'a>>::Node> + 'static)>`
24 found `std::boxed::Box<dyn std::iter::Iterator<Item = <Self as Graph<'a>>::Node>>`
25
26 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
27 --> $DIR/issue-55796.rs:21:9
28 |
29 LL | Box::new(self.in_edges(u).map(|e| e.target()))
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 |
32 note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 5:17...
33 --> $DIR/issue-55796.rs:5:17
34 |
35 LL | pub trait Graph<'a> {
36 | ^^
37 note: ...so that the type `std::iter::Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:21:39: 21:53]>` will meet its required lifetime bounds
38 --> $DIR/issue-55796.rs:21:9
39 |
40 LL | Box::new(self.in_edges(u).map(|e| e.target()))
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 = note: but, the lifetime must be valid for the static lifetime...
43 note: ...so that the expression is assignable
44 --> $DIR/issue-55796.rs:21:9
45 |
46 LL | Box::new(self.in_edges(u).map(|e| e.target()))
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 = note: expected `std::boxed::Box<(dyn std::iter::Iterator<Item = <Self as Graph<'a>>::Node> + 'static)>`
49 found `std::boxed::Box<dyn std::iter::Iterator<Item = <Self as Graph<'a>>::Node>>`
50
51 error: aborting due to 2 previous errors
52
53 For more information about this error, try `rustc --explain E0495`.