fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.3 KiB36 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-13853.rs:14:9
3   |
4LL |     fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
5   |                  - this type parameter              - expected `I` because of return type
6...
7LL |         self.iter()
8   |         ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter`
9   |
10   = note: expected type parameter `I`
11                      found struct `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 reference `&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 reference `&_`
31                 found struct `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`.