diff options
Diffstat (limited to 'tests/ui/issues/issue-21332.rs')
-rw-r--r-- | tests/ui/issues/issue-21332.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-21332.rs b/tests/ui/issues/issue-21332.rs new file mode 100644 index 000000000..6547f3a9b --- /dev/null +++ b/tests/ui/issues/issue-21332.rs @@ -0,0 +1,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() {} |