1 // #107983 - testing that `__iterator_get_unchecked` isn't suggested
2 // HELP included so that compiletest errors on the bad suggestion
i_can_has_iterator() -> impl Iterator<Item = u32>3 pub fn i_can_has_iterator() -> impl Iterator<Item = u32> {
4 //~^ ERROR expected `Box<dyn Iterator>`
5 //~| HELP consider constraining the associated type
6 Box::new(1..=10) as Box<dyn Iterator>
7 //~^ ERROR the value of the associated type `Item`
8 //~| HELP specify the associated type
9 }
10
main()11 fn main() {}
12