Remove useless help

This commit is contained in:
Esteban Küber 2019-10-10 13:17:51 -07:00
parent ab7d8f0f5a
commit 39a9e2ecba
3 changed files with 1 additions and 13 deletions

View File

@ -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| {

View File

@ -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

View File

@ -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