]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-55796.stderr
Auto merge of #55716 - RalfJung:escape-to-raw, r=oli-obk
[rust.git] / src / test / ui / issues / issue-55796.stderr
1 error[E0601]: `main` function not found in crate `issue_55796`
2    |
3    = note: consider adding a `main` function to `$DIR/issue-55796.rs`
4
5 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
6   --> $DIR/issue-55796.rs:16:9
7    |
8 LL |         Box::new(self.out_edges(u).map(|e| e.target()))
9    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10    |
11 note: first, the lifetime cannot outlive the lifetime 'a as defined on the trait at 5:17...
12   --> $DIR/issue-55796.rs:5:17
13    |
14 LL | pub trait Graph<'a> {
15    |                 ^^
16 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
17   --> $DIR/issue-55796.rs:16:9
18    |
19 LL |         Box::new(self.out_edges(u).map(|e| e.target()))
20    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21    = note: but, the lifetime must be valid for the static lifetime...
22    = note: ...so that the expression is assignable:
23            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:20: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:20:39: 20:53]>` will meet its required lifetime bounds
38   --> $DIR/issue-55796.rs:20: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            expected std::boxed::Box<(dyn std::iter::Iterator<Item=<Self as Graph<'a>>::Node> + 'static)>
45               found std::boxed::Box<dyn std::iter::Iterator<Item=<Self as Graph<'a>>::Node>>
46
47 error: aborting due to 3 previous errors
48
49 Some errors occurred: E0495, E0601.
50 For more information about an error, try `rustc --explain E0495`.