fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0308]: mismatched types 2 --> $DIR/issue-13853.rs:14:9 3 | 4LL | fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I 5 | - expected `I` because of return type 6... 7LL | self.iter() 8 | ^^^^^^^^^^^ expected type parameter, found struct `std::slice::Iter` 9 | 10 = note: expected type `I` 11 found type `std::slice::Iter<'_, N>` 12 = help: type parameters must be constrained to match other types 13 = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters 14 15error[E0599]: no method named `iter` found for type `&G` in the current scope 16 --> $DIR/issue-13853.rs:27:23 17 | 18LL | for node in graph.iter() { 19 | ^^^^ method not found in `&G` 20 21error[E0308]: mismatched types 22 --> $DIR/issue-13853.rs:37:13 23 | 24LL | iterate(graph); 25 | ^^^^^ 26 | | 27 | expected reference, found struct `std::vec::Vec` 28 | help: consider borrowing here: `&graph` 29 | 30 = note: expected type `&_` 31 found type `std::vec::Vec<Stuff>` 32 33error: aborting due to 3 previous errors 34 35Some errors have detailed explanations: E0308, E0599. 36For more information about an error, try `rustc --explain E0308`.