Skip to content

Commit 020edd9

Browse files
committed
reword ; suggestions to have consistent wording
1 parent 796ce9f commit 020edd9

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

compiler/rustc_typeck/src/check/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
346346
if call_is_multiline {
347347
err.span_suggestion(
348348
callee.span.shrink_to_hi(),
349-
"try adding a semicolon",
349+
"consider using a semicolon here",
350350
";".to_owned(),
351351
Applicability::MaybeIncorrect,
352352
);

compiler/rustc_typeck/src/check/fn_ctxt/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
395395
| ExprKind::Block(..) => {
396396
err.span_suggestion(
397397
cause_span.shrink_to_hi(),
398-
"try adding a semicolon",
398+
"consider using a semicolon here",
399399
";".to_string(),
400400
Applicability::MachineApplicable,
401401
);

src/test/ui/async-await/suggest-missing-await.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async fn dummy() {}
2121
async fn suggest_await_in_async_fn_return() {
2222
dummy()
2323
//~^ ERROR mismatched types [E0308]
24-
//~| HELP try adding a semicolon
24+
//~| HELP consider using a semicolon here
2525
//~| HELP consider `await`ing on the `Future`
2626
//~| SUGGESTION .await
2727
}

src/test/ui/async-await/suggest-missing-await.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ help: consider `await`ing on the `Future`
2929
|
3030
LL | dummy().await
3131
| ^^^^^^
32-
help: try adding a semicolon
32+
help: consider using a semicolon here
3333
|
3434
LL | dummy();
3535
| ^

src/test/ui/block-result/unexpected-return-on-unit.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
44
LL | foo()
55
| ^^^^^ expected `()`, found `usize`
66
|
7-
help: try adding a semicolon
7+
help: consider using a semicolon here
88
|
99
LL | foo();
1010
| ^

src/test/ui/proc-macro/issue-37788.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn main() {
55
| - expected `()` because of default return type
66
LL | // Test that constructing the `visible_parent_map` (in `cstore_impl.rs`) does not ICE.
77
LL | std::cell::Cell::new(0)
8-
| ^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
99
| |
1010
| expected `()`, found struct `Cell`
1111
|

src/test/ui/return/return-type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | foo(4 as usize)
66
|
77
= note: expected unit type `()`
88
found struct `S<usize>`
9-
help: try adding a semicolon
9+
help: consider using a semicolon here
1010
|
1111
LL | foo(4 as usize);
1212
| ^

src/test/ui/return/tail-expr-as-potential-return.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | | }
99
|
1010
= note: expected unit type `()`
1111
found enum `std::result::Result<_, {integer}>`
12-
help: try adding a semicolon
12+
help: consider using a semicolon here
1313
|
1414
LL | Err(42);
1515
| ^

src/test/ui/specialization/specialization-default-projection.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ LL | fn monomorphic() -> () {
2929
| -- expected `()` because of return type
3030
...
3131
LL | generic::<()>()
32-
| ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
32+
| ^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
3333
| |
3434
| expected `()`, found associated type
3535
|

src/test/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn vindictive() -> bool { true }
55
| ----------------------- `vindictive` defined here returns `bool`
66
...
77
LL | vindictive()
8-
| -^^^^^^^^^^^- help: try adding a semicolon: `;`
8+
| -^^^^^^^^^^^- help: consider using a semicolon here: `;`
99
| _____|
1010
| |
1111
LL | | (1, 2)

0 commit comments

Comments
 (0)