blob: 6547f3a9b19aefc8db7d06b91854956e4dc42e61 [file] [log] [blame]
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() {}