]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-13853.stderr
Rollup merge of #100861 - RalfJung:const-ice, r=oli-obk
[rust.git] / src / test / ui / typeck / issue-13853.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-13853.rs:14:9
3    |
4 LL |     fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
5    |                  - this type parameter              - expected `I` because of return type
6 ...
7 LL |         self.iter()
8    |         ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter`
9    |
10    = note: expected type parameter `I`
11                       found struct `std::slice::Iter<'_, N>`
12
13 error[E0599]: no method named `iter` found for reference `&G` in the current scope
14   --> $DIR/issue-13853.rs:27:23
15    |
16 LL |     for node in graph.iter() {
17    |                       ^^^^ method not found in `&G`
18
19 error[E0308]: mismatched types
20   --> $DIR/issue-13853.rs:37:13
21    |
22 LL |     iterate(graph);
23    |     ------- ^^^^^
24    |     |       |
25    |     |       expected reference, found struct `Vec`
26    |     |       help: consider borrowing here: `&graph`
27    |     arguments to this function are incorrect
28    |
29    = note: expected reference `&_`
30                  found struct `Vec<Stuff>`
31 note: function defined here
32   --> $DIR/issue-13853.rs:26:4
33    |
34 LL | fn iterate<N: Node, G: Graph<N>>(graph: &G) {
35    |    ^^^^^^^                       ---------
36
37 error: aborting due to 3 previous errors
38
39 Some errors have detailed explanations: E0308, E0599.
40 For more information about an error, try `rustc --explain E0308`.