We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2141154 commit bacb8e6Copy full SHA for bacb8e6
src/boot/me/type.ml
@@ -771,7 +771,7 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
771
| Ast.STMT_ret (Some atom) ->
772
if fn_ctx.fnctx_is_iter then
773
Common.err None
774
- "iterators can't return values; did you mean 'put'?"
+ "iterators can't return values; did you mean 'put'?";
775
demand fn_ctx.fnctx_return_type (check_atom atom)
776
777
| Ast.STMT_ret None ->
src/test/compile-fail/wrong-ret-type.rs
@@ -0,0 +1,7 @@
1
+// error-pattern: mismatched types
2
+fn mk_int() -> uint {
3
+ let int i = 3;
4
+ ret i;
5
+}
6
+fn main() {
7
0 commit comments