summaryrefslogtreecommitdiffstats
path: root/tests/ui/ret-non-nil.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/ret-non-nil.stderr')
-rw-r--r--tests/ui/ret-non-nil.stderr11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/ret-non-nil.stderr b/tests/ui/ret-non-nil.stderr
new file mode 100644
index 000000000..2029c6d9d
--- /dev/null
+++ b/tests/ui/ret-non-nil.stderr
@@ -0,0 +1,11 @@
+error[E0069]: `return;` in a function whose return type is not `()`
+ --> $DIR/ret-non-nil.rs:5:19
+ |
+LL | fn g() -> isize { return; }
+ | ----- ^^^^^^ return type is not `()`
+ | |
+ | expected `isize` because of this return type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0069`.