non-first-arm-doesnt-match-expected-return-type.stderr 482 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
error[E0308]: mismatched types
  --> $DIR/non-first-arm-doesnt-match-expected-return-type.rs:11:25
   |
LL | fn test(shouldwe: Option<u32>, shouldwe2: Option<u32>) -> u32 {
   |                                                           --- expected `u32` because of return type
...
LL |                 None => (),
   |                         ^^ expected `u32`, found `()`

error: aborting due to previous error

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