Reword message

This commit is contained in:
Esteban Küber 2020-02-25 12:08:22 -08:00
parent a29f6916d8
commit 61bc7a3462
2 changed files with 4 additions and 4 deletions

View File

@ -497,7 +497,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
if !static_sources.is_empty() {
err.note(
"found the following associated functions; to be used as methods, \
functions must have a `self` parameter",
functions must have a `self` parameter",
);
err.span_label(span, "this is an associated function, not a method");
}
@ -653,7 +653,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
span,
&format!(
"consider restricting the type parameter{s} to satisfy the \
obligation{s}",
trait bound{s}",
s = pluralize!(obligations.len())
),
format!(

View File

@ -12,7 +12,7 @@ LL | self.foo();
which is required by `Foo<T>: Bar`
`T: std::default::Default`
which is required by `Foo<T>: Bar`
help: consider restricting the type parameters to satisfy the obligations
help: consider restricting the type parameters to satisfy the trait bounds
|
LL | struct Foo<T> where T: Bar, T: std::default::Default {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -29,7 +29,7 @@ LL | self.foo();
= note: the method `foo` exists but the following trait bounds were not satisfied:
`T: std::default::Default`
which is required by `Fin<T>: Bar`
help: consider restricting the type parameter to satisfy the obligation
help: consider restricting the type parameter to satisfy the trait bound
|
LL | struct Fin<T> where T: Bar, T: std::default::Default {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^