mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 21:47:04 +00:00
reword ;
suggestions to have consistent wording
This commit is contained in:
parent
796ce9fcb7
commit
020edd91a9
@ -346,7 +346,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
if call_is_multiline {
|
||||
err.span_suggestion(
|
||||
callee.span.shrink_to_hi(),
|
||||
"try adding a semicolon",
|
||||
"consider using a semicolon here",
|
||||
";".to_owned(),
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
|
@ -395,7 +395,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
| ExprKind::Block(..) => {
|
||||
err.span_suggestion(
|
||||
cause_span.shrink_to_hi(),
|
||||
"try adding a semicolon",
|
||||
"consider using a semicolon here",
|
||||
";".to_string(),
|
||||
Applicability::MachineApplicable,
|
||||
);
|
||||
|
@ -21,7 +21,7 @@ async fn dummy() {}
|
||||
async fn suggest_await_in_async_fn_return() {
|
||||
dummy()
|
||||
//~^ ERROR mismatched types [E0308]
|
||||
//~| HELP try adding a semicolon
|
||||
//~| HELP consider using a semicolon here
|
||||
//~| HELP consider `await`ing on the `Future`
|
||||
//~| SUGGESTION .await
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ help: consider `await`ing on the `Future`
|
||||
|
|
||||
LL | dummy().await
|
||||
| ^^^^^^
|
||||
help: try adding a semicolon
|
||||
help: consider using a semicolon here
|
||||
|
|
||||
LL | dummy();
|
||||
| ^
|
||||
|
@ -4,7 +4,7 @@ error[E0308]: mismatched types
|
||||
LL | foo()
|
||||
| ^^^^^ expected `()`, found `usize`
|
||||
|
|
||||
help: try adding a semicolon
|
||||
help: consider using a semicolon here
|
||||
|
|
||||
LL | foo();
|
||||
| ^
|
||||
|
@ -5,7 +5,7 @@ LL | fn main() {
|
||||
| - expected `()` because of default return type
|
||||
LL | // Test that constructing the `visible_parent_map` (in `cstore_impl.rs`) does not ICE.
|
||||
LL | std::cell::Cell::new(0)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
|
||||
| |
|
||||
| expected `()`, found struct `Cell`
|
||||
|
|
||||
|
@ -6,7 +6,7 @@ LL | foo(4 as usize)
|
||||
|
|
||||
= note: expected unit type `()`
|
||||
found struct `S<usize>`
|
||||
help: try adding a semicolon
|
||||
help: consider using a semicolon here
|
||||
|
|
||||
LL | foo(4 as usize);
|
||||
| ^
|
||||
|
@ -9,7 +9,7 @@ LL | | }
|
||||
|
|
||||
= note: expected unit type `()`
|
||||
found enum `std::result::Result<_, {integer}>`
|
||||
help: try adding a semicolon
|
||||
help: consider using a semicolon here
|
||||
|
|
||||
LL | Err(42);
|
||||
| ^
|
||||
|
@ -29,7 +29,7 @@ LL | fn monomorphic() -> () {
|
||||
| -- expected `()` because of return type
|
||||
...
|
||||
LL | generic::<()>()
|
||||
| ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
|
||||
| ^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
|
||||
| |
|
||||
| expected `()`, found associated type
|
||||
|
|
||||
|
@ -5,7 +5,7 @@ LL | fn vindictive() -> bool { true }
|
||||
| ----------------------- `vindictive` defined here returns `bool`
|
||||
...
|
||||
LL | vindictive()
|
||||
| -^^^^^^^^^^^- help: try adding a semicolon: `;`
|
||||
| -^^^^^^^^^^^- help: consider using a semicolon here: `;`
|
||||
| _____|
|
||||
| |
|
||||
LL | | (1, 2)
|
||||
|
Loading…
Reference in New Issue
Block a user