review comment: review wording or missing return error
This commit is contained in:
parent
5a54945b6f
commit
33d1082d6e
15 changed files with 22 additions and 21 deletions
|
|
@ -4,7 +4,7 @@ error[E0308]: mismatched types
|
|||
LL | pub fn f<'a, T: Tr<'a>>() -> <T as Tr<'a>>::Out {}
|
||||
| - ^^^^^^^^^^^^^^^^^^ expected associated type, found ()
|
||||
| |
|
||||
| this function's body doesn't `return` a value
|
||||
| this function implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `<T as Tr<'a>>::Out`
|
||||
found type `()`
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ error[E0308]: mismatched types
|
|||
LL | fn foo() -> bool {
|
||||
| --- ^^^^ expected bool, found ()
|
||||
| |
|
||||
| this function's body doesn't `return` a value
|
||||
| this function implicitly returns `()` as its body has no tail or `return` expression
|
||||
LL |
|
||||
LL | break true;
|
||||
| - help: consider removing this semicolon
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ error[E0308]: mismatched types
|
|||
LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize {
|
||||
| ------------------------ ^^^^^ expected isize, found ()
|
||||
| |
|
||||
| this function's body doesn't `return` a value
|
||||
| this function implicitly returns `()` as its body has no tail or `return` expression
|
||||
|
|
||||
= note: expected type `isize`
|
||||
found type `()`
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ error[E0308]: mismatched types
|
|||
LL | fn foo(b: bool) -> Result<bool,String> {
|
||||
| --- ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
|
||||
| |
|
||||
| this function's body doesn't `return` a value
|
||||
| this function implicitly returns `()` as its body has no tail or `return` expression
|
||||
LL | Err("bar".to_string());
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue