summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21332.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-21332.stderr')
-rw-r--r--tests/ui/issues/issue-21332.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-21332.stderr b/tests/ui/issues/issue-21332.stderr
new file mode 100644
index 000000000..0e1beebf2
--- /dev/null
+++ b/tests/ui/issues/issue-21332.stderr
@@ -0,0 +1,15 @@
+error[E0053]: method `next` has an incompatible type for trait
+ --> $DIR/issue-21332.rs:5:27
+ |
+LL | fn next(&mut self) -> Result<i32, i32> { Ok(7) }
+ | ^^^^^^^^^^^^^^^^
+ | |
+ | expected enum `Option`, found enum `Result`
+ | help: change the output type to match the trait: `Option<i32>`
+ |
+ = note: expected signature `fn(&mut S) -> Option<i32>`
+ found signature `fn(&mut S) -> Result<i32, i32>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0053`.