Skip to content

Commit 27774a0

Browse files
committed
Adjust note wording
1 parent 7852895 commit 27774a0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10121012
);
10131013

10141014
err.note(format!(
1015-
"the caller chooses the type of {} which can be different from {}",
1015+
"the caller chooses a type for `{}` which can be different from `{}`",
10161016
expected_ty_as_param.name, found
10171017
));
10181018
}

tests/ui/return/return-impl-trait-bad.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ LL | "don't suggest this, because the generic param is used in the bound."
5353
|
5454
= note: expected type parameter `T`
5555
found reference `&'static str`
56-
= note: the caller chooses the type of T which can be different from &'static str
56+
= note: the caller chooses a type for `T` which can be different from `&'static str`
5757

5858
error: aborting due to 4 previous errors
5959

tests/ui/return/return-impl-trait.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | ()
1212
|
1313
= note: expected type parameter `T`
1414
found unit type `()`
15-
= note: the caller chooses the type of T which can be different from ()
15+
= note: the caller chooses a type for `T` which can be different from `()`
1616

1717
error[E0308]: mismatched types
1818
--> $DIR/return-impl-trait.rs:23:5
@@ -29,7 +29,7 @@ LL | ()
2929
|
3030
= note: expected type parameter `T`
3131
found unit type `()`
32-
= note: the caller chooses the type of T which can be different from ()
32+
= note: the caller chooses a type for `T` which can be different from `()`
3333

3434
error: aborting due to 2 previous errors
3535

0 commit comments

Comments
 (0)