mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
11 lines
449 B
Rust
11 lines
449 B
Rust
// #107983 - testing that `__iterator_get_unchecked` isn't suggested
|
|
// HELP included so that compiletest errors on the bad suggestion
|
|
pub fn i_can_has_iterator() -> impl Iterator<Item = u32> {
|
|
//~^ ERROR expected `Box<dyn Iterator>`
|
|
//~| HELP consider constraining the associated type
|
|
Box::new(1..=10) as Box<dyn Iterator>
|
|
//~^ ERROR the value of the associated type `Item`
|
|
//~| HELP specify the associated type
|
|
}
|
|
|
|
fn main() {}
|