1
Fork 0

reword ; suggestions to have consistent wording

This commit is contained in:
Esteban Küber 2021-02-04 13:59:23 -08:00
parent 796ce9fcb7
commit 020edd91a9
10 changed files with 10 additions and 10 deletions

View file

@ -346,7 +346,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
if call_is_multiline { if call_is_multiline {
err.span_suggestion( err.span_suggestion(
callee.span.shrink_to_hi(), callee.span.shrink_to_hi(),
"try adding a semicolon", "consider using a semicolon here",
";".to_owned(), ";".to_owned(),
Applicability::MaybeIncorrect, Applicability::MaybeIncorrect,
); );

View file

@ -395,7 +395,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
| ExprKind::Block(..) => { | ExprKind::Block(..) => {
err.span_suggestion( err.span_suggestion(
cause_span.shrink_to_hi(), cause_span.shrink_to_hi(),
"try adding a semicolon", "consider using a semicolon here",
";".to_string(), ";".to_string(),
Applicability::MachineApplicable, Applicability::MachineApplicable,
); );

View file

@ -21,7 +21,7 @@ async fn dummy() {}
async fn suggest_await_in_async_fn_return() { async fn suggest_await_in_async_fn_return() {
dummy() dummy()
//~^ ERROR mismatched types [E0308] //~^ ERROR mismatched types [E0308]
//~| HELP try adding a semicolon //~| HELP consider using a semicolon here
//~| HELP consider `await`ing on the `Future` //~| HELP consider `await`ing on the `Future`
//~| SUGGESTION .await //~| SUGGESTION .await
} }

View file

@ -29,7 +29,7 @@ help: consider `await`ing on the `Future`
| |
LL | dummy().await LL | dummy().await
| ^^^^^^ | ^^^^^^
help: try adding a semicolon help: consider using a semicolon here
| |
LL | dummy(); LL | dummy();
| ^ | ^

View file

@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | foo() LL | foo()
| ^^^^^ expected `()`, found `usize` | ^^^^^ expected `()`, found `usize`
| |
help: try adding a semicolon help: consider using a semicolon here
| |
LL | foo(); LL | foo();
| ^ | ^

View file

@ -5,7 +5,7 @@ LL | fn main() {
| - expected `()` because of default return type | - expected `()` because of default return type
LL | // Test that constructing the `visible_parent_map` (in `cstore_impl.rs`) does not ICE. LL | // Test that constructing the `visible_parent_map` (in `cstore_impl.rs`) does not ICE.
LL | std::cell::Cell::new(0) LL | std::cell::Cell::new(0)
| ^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | ^^^^^^^^^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
| | | |
| expected `()`, found struct `Cell` | expected `()`, found struct `Cell`
| |

View file

@ -6,7 +6,7 @@ LL | foo(4 as usize)
| |
= note: expected unit type `()` = note: expected unit type `()`
found struct `S<usize>` found struct `S<usize>`
help: try adding a semicolon help: consider using a semicolon here
| |
LL | foo(4 as usize); LL | foo(4 as usize);
| ^ | ^

View file

@ -9,7 +9,7 @@ LL | | }
| |
= note: expected unit type `()` = note: expected unit type `()`
found enum `std::result::Result<_, {integer}>` found enum `std::result::Result<_, {integer}>`
help: try adding a semicolon help: consider using a semicolon here
| |
LL | Err(42); LL | Err(42);
| ^ | ^

View file

@ -29,7 +29,7 @@ LL | fn monomorphic() -> () {
| -- expected `()` because of return type | -- expected `()` because of return type
... ...
LL | generic::<()>() LL | generic::<()>()
| ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | ^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
| | | |
| expected `()`, found associated type | expected `()`, found associated type
| |

View file

@ -5,7 +5,7 @@ LL | fn vindictive() -> bool { true }
| ----------------------- `vindictive` defined here returns `bool` | ----------------------- `vindictive` defined here returns `bool`
... ...
LL | vindictive() LL | vindictive()
| -^^^^^^^^^^^- help: try adding a semicolon: `;` | -^^^^^^^^^^^- help: consider using a semicolon here: `;`
| _____| | _____|
| | | |
LL | | (1, 2) LL | | (1, 2)