mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
11 lines
240 B
Rust
11 lines
240 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 enum `Option`, found enum `Result`
|
|
}
|
|
|
|
fn main() {}
|