about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2020-02-25 12:08:22 -0800
committerEsteban Küber <esteban@kuber.com.ar>2020-02-28 11:37:59 -0800
commit61bc7a346217ff7f180662d10dd34605a876901d (patch)
tree2538429e2d18ec9049c39d42d6d9e685e1df352c
parenta29f6916d88c4a479139cebc95a98028efa51611 (diff)
downloadrust-61bc7a346217ff7f180662d10dd34605a876901d.tar.gz
rust-61bc7a346217ff7f180662d10dd34605a876901d.zip
Reword message
-rw-r--r--src/librustc_typeck/check/method/suggest.rs4
-rw-r--r--src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs
index 55b15925bf7..5528895ad03 100644
--- a/src/librustc_typeck/check/method/suggest.rs
+++ b/src/librustc_typeck/check/method/suggest.rs
@@ -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!(
diff --git a/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr b/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr
index a9b57cfc0bd..c6d94826c0c 100644
--- a/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr
+++ b/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr
@@ -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 {
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^