2018-07-15 16:11:54 -05:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-13853.rs:14:9
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
|
LL | fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
|
2019-10-31 22:58:37 -05:00
|
|
|
| - this type parameter - expected `I` because of return type
|
2018-07-15 16:11:54 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | self.iter()
|
2019-10-31 22:58:37 -05:00
|
|
|
| ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected type parameter `I`
|
|
|
|
found struct `std::slice::Iter<'_, N>`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no method named `iter` found for reference `&G` in the current scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-13853.rs:27:23
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | for node in graph.iter() {
|
2019-09-06 14:00:07 -05:00
|
|
|
| ^^^^ method not found in `&G`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-13853.rs:37:13
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | iterate(graph);
|
2018-07-15 16:11:54 -05:00
|
|
|
| ^^^^^
|
|
|
|
| |
|
|
|
|
| expected reference, found struct `std::vec::Vec`
|
|
|
|
| help: consider borrowing here: `&graph`
|
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected reference `&_`
|
|
|
|
found struct `std::vec::Vec<Stuff>`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0308, E0599.
|
2018-07-15 16:11:54 -05:00
|
|
|
For more information about an error, try `rustc --explain E0308`.
|