Change wording for function without return value

Fix #62677
This commit is contained in:
Esteban Küber 2019-08-06 22:22:04 -07:00
parent 4fbbf99c50
commit 01a61394f8
15 changed files with 21 additions and 21 deletions

View file

@ -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
| this function's body doesn't return a value
|
= note: expected type `<T as Tr<'a>>::Out`
found type `()`

View file

@ -16,7 +16,7 @@ error[E0308]: mismatched types
LL | fn foo() -> bool {
| --- ^^^^ expected bool, found ()
| |
| this function's body doesn't return
| this function's body doesn't return a value
LL |
LL | break true;
| - help: consider removing this semicolon

View file

@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize {
| ------------------------ ^^^^^ expected isize, found ()
| |
| this function's body doesn't return
| this function's body doesn't return a value
|
= note: expected type `isize`
found type `()`

View file

@ -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
| this function's body doesn't return a value
LL | Err("bar".to_string());
| - help: consider removing this semicolon
|