summaryrefslogtreecommitdiffstats
path: root/tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr')
-rw-r--r--tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr b/tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr
new file mode 100644
index 000000000..e6d93b8b5
--- /dev/null
+++ b/tests/ui/match/non-first-arm-doesnt-match-expected-return-type.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+ --> $DIR/non-first-arm-doesnt-match-expected-return-type.rs:11:25
+ |
+LL | fn test(shouldwe: Option<u32>, shouldwe2: Option<u32>) -> u32 {
+ | --- expected `u32` because of return type
+...
+LL | None => (),
+ | ^^ expected `u32`, found `()`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.