Tweak wording of fn without explicit return
This commit is contained in:
parent
0d53f699ea
commit
efa62d66e3
15 changed files with 24 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's body doesn't `return` a value
|
||||
|
|
||||
= 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's body doesn't `return` a value
|
||||
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's body doesn't `return` a value
|
||||
|
|
||||
= 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's body doesn't `return` a value
|
||||
LL | Err("bar".to_string());
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue