summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21332.rs
blob: 6547f3a9b19aefc8db7d06b91854956e4dc42e61 (plain)
1
2
3
4
5
6
7
8
9
10
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() {}