Skip to content

Commit 542be6f

Browse files
committed
review comment: wording
1 parent 0dcdbae commit 542be6f

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

src/librustc/infer/error_reporting/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,16 +1340,18 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
13401340
err.span_label(
13411341
*sp,
13421342
format!(
1343-
"{}the {} {}{}{}",
1344-
if count > 1 { "one of " } else { "" },
1345-
target,
1346-
key,
1347-
pluralize!(count),
1343+
"{}{}{} {}{}",
13481344
if sp.is_desugaring(DesugaringKind::Async) {
1349-
" in the `Output` of this `async fn`"
1345+
"the `Output` of this `async fn`'s "
1346+
} else if count == 1 {
1347+
"the "
13501348
} else {
13511349
""
13521350
},
1351+
if count > 1 { "one of the " } else { "" },
1352+
target,
1353+
key,
1354+
pluralize!(count),
13531355
),
13541356
);
13551357
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/dont-suggest-missing-await.rs:14:18
33
|
44
LL | async fn make_u32() -> u32 {
5-
| --- the found opaque type in the `Output` of this `async fn`
5+
| --- the `Output` of this `async fn`'s found opaque type
66
...
77
LL | take_u32(x)
88
| ^ expected `u32`, found opaque type

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/suggest-missing-await-closure.rs:16:18
33
|
44
LL | async fn make_u32() -> u32 {
5-
| --- the found opaque type in the `Output` of this `async fn`
5+
| --- the `Output` of this `async fn`'s found opaque type
66
...
77
LL | take_u32(x)
88
| ^

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/suggest-missing-await.rs:13:14
33
|
44
LL | async fn make_u32() -> u32 {
5-
| --- the found opaque type in the `Output` of this `async fn`
5+
| --- the `Output` of this `async fn`'s found opaque type
66
...
77
LL | take_u32(x)
88
| ^
@@ -17,7 +17,7 @@ error[E0308]: mismatched types
1717
--> $DIR/suggest-missing-await.rs:23:5
1818
|
1919
LL | async fn dummy() {}
20-
| - the found opaque type in the `Output` of this `async fn`
20+
| - the `Output` of this `async fn`'s found opaque type
2121
...
2222
LL | dummy()
2323
| ^^^^^^^ expected `()`, found opaque type

0 commit comments

Comments
 (0)