rust/src/test/ui/issues/issue-13853.stderr

35 lines
1.1 KiB
Plaintext
Raw Normal View History

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
| - 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()
| ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter`
2018-07-15 16:11:54 -05:00
|
= note: expected type parameter `I`
found struct `std::slice::Iter<'_, N>`
2018-07-15 16:11:54 -05: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() {
| ^^^^ 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`
|
= note: expected reference `&_`
found struct `std::vec::Vec<Stuff>`
2018-07-15 16:11:54 -05:00
error: aborting due to 3 previous errors
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`.