1 error[E0308]: mismatched types
2 --> $DIR/issue-13853.rs:14:9
4 LL | fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
5 | - this type parameter - expected `I` because of return type
8 | ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter`
10 = note: expected type parameter `I`
11 found struct `std::slice::Iter<'_, N>`
13 error[E0599]: no method named `iter` found for reference `&G` in the current scope
14 --> $DIR/issue-13853.rs:27:23
16 LL | for node in graph.iter() {
17 | ^^^^ method not found in `&G`
19 error[E0308]: mismatched types
20 --> $DIR/issue-13853.rs:37:13
25 | | expected reference, found struct `Vec`
26 | | help: consider borrowing here: `&graph`
27 | arguments to this function are incorrect
29 = note: expected reference `&_`
30 found struct `Vec<Stuff>`
31 note: function defined here
32 --> $DIR/issue-13853.rs:26:4
34 LL | fn iterate<N: Node, G: Graph<N>>(graph: &G) {
37 error: aborting due to 3 previous errors
39 Some errors have detailed explanations: E0308, E0599.
40 For more information about an error, try `rustc --explain E0308`.