We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04afd01 commit 6fbb60cCopy full SHA for 6fbb60c
tests/ui/typeck/tail-return-type-mismatch.rs
@@ -1,5 +1,13 @@
1
-fn f() -> isize { return g(); } //~ ERROR mismatched types
+//! This test verifies that the type checker correctly identifies and reports error
2
3
-fn g() -> usize { return 0; }
+fn f() -> isize {
4
+ return g();
5
+} //~ ERROR mismatched types [E0308]
6
-fn main() { let y = f(); }
7
+fn g() -> usize {
8
+ return 0;
9
+}
10
+
11
+fn main() {
12
+ let y = f();
13
0 commit comments