mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-19 20:13:47 +00:00
62ba3e70a1
The previous output was unintuitive to users.
11 lines
245 B
Rust
11 lines
245 B
Rust
struct S;
|
|
|
|
impl Iterator for S {
|
|
type Item = i32;
|
|
fn next(&mut self) -> Result<i32, i32> { Ok(7) }
|
|
//~^ ERROR method `next` has an incompatible type for trait
|
|
//~| expected `Option<i32>`, found `Result<i32, i32>`
|
|
}
|
|
|
|
fn main() {}
|