Skip to content

Commit 0173490

Browse files
committed
Reword message
1 parent c02de78 commit 0173490

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustc_typeck/check/method/suggest.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
497497
if !static_sources.is_empty() {
498498
err.note(
499499
"found the following associated functions; to be used as methods, \
500-
functions must have a `self` parameter",
500+
functions must have a `self` parameter",
501501
);
502502
err.span_label(span, "this is an associated function, not a method");
503503
}
@@ -653,7 +653,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
653653
span,
654654
&format!(
655655
"consider restricting the type parameter{s} to satisfy the \
656-
obligation{s}",
656+
trait bound{s}",
657657
s = pluralize!(obligations.len())
658658
),
659659
format!(

src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | self.foo();
1212
which is required by `Foo<T>: Bar`
1313
`T: std::default::Default`
1414
which is required by `Foo<T>: Bar`
15-
help: consider restricting the type parameters to satisfy the obligations
15+
help: consider restricting the type parameters to satisfy the trait bounds
1616
|
1717
LL | struct Foo<T> where T: Bar, T: std::default::Default {
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL | self.foo();
2929
= note: the method `foo` exists but the following trait bounds were not satisfied:
3030
`T: std::default::Default`
3131
which is required by `Fin<T>: Bar`
32-
help: consider restricting the type parameter to satisfy the obligation
32+
help: consider restricting the type parameter to satisfy the trait bound
3333
|
3434
LL | struct Fin<T> where T: Bar, T: std::default::Default {
3535
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)