| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found `u32`
...
LL | Box::new(1..=10) as Box<dyn Iterator>
| ------------------------------------- return type was inferred to be `Box<dyn Iterator>` here
|
= note: expected associated type `<dyn Iterator as Iterator>::Item`
found type `u32`
= help: consider constraining the associated type `<dyn Iterator as Iterator>::Item` to `u32` or calling a method that returns `<dyn Iterator as Iterator>::Item`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0191, E0271.
For more information about an error, try `rustc --explain E0191`.