about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-10-10 13:17:51 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-10-15 13:55:44 -0700
commit39a9e2ecba1797ef196725c25f48746834d8ac8f (patch)
tree34de46ac5bd18bd2ebbf3839e7578dc1bb3dccd1
parentab7d8f0f5a8624d583989b76015254fff2f59cb1 (diff)
downloadrust-39a9e2ecba1797ef196725c25f48746834d8ac8f.tar.gz
rust-39a9e2ecba1797ef196725c25f48746834d8ac8f.zip
Remove useless `help`
-rw-r--r--src/librustc/traits/error_reporting.rs11
-rw-r--r--src/test/ui/partialeq_help.stderr1
-rw-r--r--src/test/ui/traits/trait-suggest-where-clause.stderr2
3 files changed, 1 insertions, 13 deletions
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs
index abf265be7c5..9931a2517f1 100644
--- a/src/librustc/traits/error_reporting.rs
+++ b/src/librustc/traits/error_reporting.rs
@@ -969,19 +969,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
         trait_ref: &ty::PolyTraitRef<'_>,
         body_id: hir::HirId,
     ) {
-        debug!(
-            "suggest_restricting_param_bound trait_ref={:?} ty={:?} ({:?})",
-            trait_ref,
-            trait_ref.self_ty(),
-            trait_ref.self_ty().kind,
-        );
         let (param_ty, projection) = match &trait_ref.self_ty().kind {
             ty::Param(param_ty) => (Some(param_ty), None),
             ty::Projection(projection) => (None, Some(projection)),
-            _ => {
-                err.help(&format!("consider adding a `where {}` bound", trait_ref.to_predicate()));
-                return;
-            }
+            _ => return,
         };
 
         let mut suggest_restriction = |generics: &hir::Generics, msg| {
diff --git a/src/test/ui/partialeq_help.stderr b/src/test/ui/partialeq_help.stderr
index 9021bd30a77..6acc09b62c8 100644
--- a/src/test/ui/partialeq_help.stderr
+++ b/src/test/ui/partialeq_help.stderr
@@ -5,7 +5,6 @@ LL |     a == b;
    |       ^^ no implementation for `&T == T`
    |
    = help: the trait `std::cmp::PartialEq<T>` is not implemented for `&T`
-   = help: consider adding a `where &T: std::cmp::PartialEq<T>` bound
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/traits/trait-suggest-where-clause.stderr b/src/test/ui/traits/trait-suggest-where-clause.stderr
index bc9948064a3..f1004ea9dc6 100644
--- a/src/test/ui/traits/trait-suggest-where-clause.stderr
+++ b/src/test/ui/traits/trait-suggest-where-clause.stderr
@@ -39,7 +39,6 @@ error[E0277]: the trait bound `u64: std::convert::From<T>` is not satisfied
 LL |     <u64 as From<T>>::from;
    |     ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `u64`
    |
-   = help: consider adding a `where u64: std::convert::From<T>` bound
    = note: required by `std::convert::From::from`
 
 error[E0277]: the trait bound `u64: std::convert::From<<T as std::iter::Iterator>::Item>` is not satisfied
@@ -48,7 +47,6 @@ error[E0277]: the trait bound `u64: std::convert::From<<T as std::iter::Iterator
 LL |     <u64 as From<<T as Iterator>::Item>>::from;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<<T as std::iter::Iterator>::Item>` is not implemented for `u64`
    |
-   = help: consider adding a `where u64: std::convert::From<<T as std::iter::Iterator>::Item>` bound
    = note: required by `std::convert::From::from`
 
 error[E0277]: the trait bound `Misc<_>: std::convert::From<T>` is not satisfied