| error[E0308]: mismatched types |
| --> $DIR/issue-13853.rs:14:9 |
| | |
| LL | fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I |
| | - this type parameter - expected `I` because of return type |
| ... |
| LL | self.iter() |
| | ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter` |
| | |
| = note: expected type parameter `I` |
| found struct `std::slice::Iter<'_, N>` |
| = help: type parameters must be constrained to match other types |
| = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters |
| |
| error[E0599]: no method named `iter` found for type `&G` in the current scope |
| --> $DIR/issue-13853.rs:27:23 |
| | |
| LL | for node in graph.iter() { |
| | ^^^^ method not found in `&G` |
| |
| error[E0308]: mismatched types |
| --> $DIR/issue-13853.rs:37:13 |
| | |
| LL | iterate(graph); |
| | ^^^^^ |
| | | |
| | expected reference, found struct `std::vec::Vec` |
| | help: consider borrowing here: `&graph` |
| | |
| = note: expected reference `&_` |
| found struct `std::vec::Vec<Stuff>` |
| |
| error: aborting due to 3 previous errors |
| |
| Some errors have detailed explanations: E0308, E0599. |
| For more information about an error, try `rustc --explain E0308`. |