2015-07-18 20:14:36 -05:00
|
|
|
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
|
2021-01-28 10:01:36 -06:00
|
|
|
//~| expected enum `Option`, found enum `Result`
|
2015-07-18 20:14:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|