]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/block-result/consider-removing-last-semi.stderr
Remove E0308 note when primary label has all info
[rust.git] / src / test / ui / block-result / consider-removing-last-semi.stderr
index 618d020ce08b54c443add265e724fc8d744c337d..fed98f912462b38fe5a1a177dc81be6fda99fe2f 100644 (file)
@@ -4,13 +4,10 @@ error[E0308]: mismatched types
 LL | fn f() -> String {
    |    -      ^^^^^^ expected struct `std::string::String`, found ()
    |    |
-   |    this function's body doesn't return
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     0u8;
 LL |     "bla".to_string();
    |                      - help: consider removing this semicolon
-   |
-   = note: expected type `std::string::String`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/consider-removing-last-semi.rs:6:11
@@ -18,13 +15,10 @@ error[E0308]: mismatched types
 LL | fn g() -> String {
    |    -      ^^^^^^ expected struct `std::string::String`, found ()
    |    |
-   |    this function's body doesn't return
+   |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     "this won't work".to_string();
 LL |     "removeme".to_string();
    |                           - help: consider removing this semicolon
-   |
-   = note: expected type `std::string::String`
-              found type `()`
 
 error: aborting due to 2 previous errors