]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/parser/expr-as-stmt.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / parser / expr-as-stmt.stderr
index 324aed0ad7cf6df71e5ecb701edbe007e6fad0a6..09a6d7cbeb17673514c4f02a500806d3cb107849 100644 (file)
@@ -40,24 +40,44 @@ error[E0308]: mismatched types
    |
 LL |     {2} + {2}
    |      ^ expected `()`, found integer
+   |
+help: you might have meant to return this value
+   |
+LL |     {return 2;} + {2}
+   |      ^^^^^^  ^
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:12:6
    |
 LL |     {2} + 2
    |      ^ expected `()`, found integer
+   |
+help: you might have meant to return this value
+   |
+LL |     {return 2;} + 2
+   |      ^^^^^^  ^
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:18:7
    |
 LL |     { 42 } + foo;
    |       ^^ expected `()`, found integer
+   |
+help: you might have meant to return this value
+   |
+LL |     { return 42; } + foo;
+   |       ^^^^^^   ^
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:24:7
    |
 LL |     { 3 } * 3
    |       ^ expected `()`, found integer
+   |
+help: you might have meant to return this value
+   |
+LL |     { return 3; } * 3
+   |       ^^^^^^  ^
 
 error[E0614]: type `{integer}` cannot be dereferenced
   --> $DIR/expr-as-stmt.rs:24:11