summary refs log tree commit diff
path: root/src/test/ui/block-result/consider-removing-last-semi.stderr
blob: f4984ca446309d83d88ba24dd63387b1efa5afaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
error[E0308]: mismatched types
  --> $DIR/consider-removing-last-semi.rs:1:11
   |
LL | fn f() -> String {
   |    -      ^^^^^^ expected struct `std::string::String`, found ()
   |    |
   |    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
   |
LL | fn g() -> String {
   |    -      ^^^^^^ expected struct `std::string::String`, found ()
   |    |
   |    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

For more information about this error, try `rustc --explain E0308`.