mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Reword message
This commit is contained in:
parent
a29f6916d8
commit
61bc7a3462
@ -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!(
|
||||
|
@ -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 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user