Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8b0ab54

Browse files
committed
review comment: change wording
1 parent 95d9009 commit 8b0ab54

30 files changed

+55
-55
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3010,7 +3010,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
30103010
}
30113011
}
30123012
let mut a = "a";
3013-
let mut this = "this";
3013+
let mut this = "this bound";
30143014
let mut note = None;
30153015
let mut help = None;
30163016
if let ty::PredicateKind::Clause(clause) = predicate.kind().skip_binder()
@@ -3036,7 +3036,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
30363036
.any(|param| tcx.def_span(param.def_id) == span)
30373037
{
30383038
a = "an implicit `Sized`";
3039-
this = "the implicit `Sized` requirement on this";
3039+
this = "the implicit `Sized` requirement on this type parameter";
30403040
}
30413041
if let Some(hir::Node::TraitItem(hir::TraitItem {
30423042
ident,
@@ -3106,7 +3106,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
31063106
};
31073107
let descr = format!("required by {a} bound in `{item_name}`");
31083108
if span.is_visible(sm) {
3109-
let msg = format!("required by {this} bound in `{short_item_name}`");
3109+
let msg = format!("required by {this} in `{short_item_name}`");
31103110
multispan.push_span_label(span, msg);
31113111
err.span_note(multispan, descr);
31123112
} else {

tests/ui/associated-types/issue-20005.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ note: required by an implicit `Sized` bound in `From`
88
--> $DIR/issue-20005.rs:1:12
99
|
1010
LL | trait From<Src> {
11-
| ^^^ required by the implicit `Sized` requirement on this bound in `From`
11+
| ^^^ required by the implicit `Sized` requirement on this type parameter in `From`
1212
help: consider further restricting `Self`
1313
|
1414
LL | ) -> <Dst as From<Self>>::Result where Dst: From<Self>, Self: Sized {

tests/ui/dst/dst-sized-trait-param.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Foo`
99
--> $DIR/dst-sized-trait-param.rs:5:11
1010
|
1111
LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
12-
| ^ required by the implicit `Sized` requirement on this bound in `Foo`
12+
| ^ required by the implicit `Sized` requirement on this type parameter in `Foo`
1313
help: consider relaxing the implicit `Sized` restriction
1414
|
1515
LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is sized

tests/ui/extern/extern-types-unsized.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
99
--> $DIR/extern-types-unsized.rs:19:17
1010
|
1111
LL | fn assert_sized<T>() {}
12-
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
12+
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
1313
help: consider relaxing the implicit `Sized` restriction
1414
|
1515
LL | fn assert_sized<T: ?Sized>() {}
@@ -31,7 +31,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
3131
--> $DIR/extern-types-unsized.rs:19:17
3232
|
3333
LL | fn assert_sized<T>() {}
34-
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
34+
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
3535
help: consider relaxing the implicit `Sized` restriction
3636
|
3737
LL | fn assert_sized<T: ?Sized>() {}
@@ -53,7 +53,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
5353
--> $DIR/extern-types-unsized.rs:19:17
5454
|
5555
LL | fn assert_sized<T>() {}
56-
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
56+
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
5757
help: consider relaxing the implicit `Sized` restriction
5858
|
5959
LL | fn assert_sized<T: ?Sized>() {}
@@ -75,7 +75,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
7575
--> $DIR/extern-types-unsized.rs:19:17
7676
|
7777
LL | fn assert_sized<T>() {}
78-
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
78+
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
7979
help: consider relaxing the implicit `Sized` restriction
8080
|
8181
LL | fn assert_sized<T: ?Sized>() {}

tests/ui/generic-associated-types/issue-88287.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ note: required by an implicit `Sized` bound in `<T as SearchableResourceExt<Crit
1111
--> $DIR/issue-88287.rs:24:6
1212
|
1313
LL | impl<T, Criteria> SearchableResourceExt<Criteria> for T
14-
| ^ required by the implicit `Sized` requirement on this bound in `<T as SearchableResourceExt<Criteria>>`
14+
| ^ required by the implicit `Sized` requirement on this type parameter in `<T as SearchableResourceExt<Criteria>>`
1515
help: consider removing the `?Sized` bound to make the type parameter `Sized`
1616
|
1717
LL - A: SearchableResource<B> + ?Sized + 'f,

tests/ui/impl-trait/in-trait/wf-bounds.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ note: required by an implicit `Sized` bound in `Wf`
1919
--> $DIR/wf-bounds.rs:7:10
2020
|
2121
LL | trait Wf<T> {
22-
| ^ required by the implicit `Sized` requirement on this bound in `Wf`
22+
| ^ required by the implicit `Sized` requirement on this type parameter in `Wf`
2323
help: consider relaxing the implicit `Sized` restriction
2424
|
2525
LL | trait Wf<T: ?Sized> {

tests/ui/issues/issue-10412.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ note: required by an implicit `Sized` bound in `Serializable`
6262
--> $DIR/issue-10412.rs:1:27
6363
|
6464
LL | trait Serializable<'self, T> {
65-
| ^ required by the implicit `Sized` requirement on this bound in `Serializable`
65+
| ^ required by the implicit `Sized` requirement on this type parameter in `Serializable`
6666
help: consider relaxing the implicit `Sized` restriction
6767
|
6868
LL | trait Serializable<'self, T: ?Sized> {

tests/ui/issues/issue-18919.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Option`
99
--> $DIR/issue-18919.rs:7:13
1010
|
1111
LL | enum Option<T> {
12-
| ^ required by the implicit `Sized` requirement on this bound in `Option`
12+
| ^ required by the implicit `Sized` requirement on this type parameter in `Option`
1313
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
1414
--> $DIR/issue-18919.rs:7:13
1515
|

tests/ui/issues/issue-23281.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Vec`
99
--> $DIR/issue-23281.rs:8:12
1010
|
1111
LL | struct Vec<T> {
12-
| ^ required by the implicit `Sized` requirement on this bound in `Vec`
12+
| ^ required by the implicit `Sized` requirement on this type parameter in `Vec`
1313
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
1414
--> $DIR/issue-23281.rs:8:12
1515
|

tests/ui/issues/issue-87199.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ note: required by an implicit `Sized` bound in `ref_arg`
2727
--> $DIR/issue-87199.rs:10:12
2828
|
2929
LL | fn ref_arg<T: ?Send>(_: &T) {}
30-
| ^ required by the implicit `Sized` requirement on this bound in `ref_arg`
30+
| ^ required by the implicit `Sized` requirement on this type parameter in `ref_arg`
3131
help: consider relaxing the implicit `Sized` restriction
3232
|
3333
LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}

0 commit comments

Comments
 (0)