Remove invalid suggestion involving Fn trait bound
This commit is contained in:
parent
d5fd37f00f
commit
f8c10ff8b7
3 changed files with 30 additions and 0 deletions
|
@ -1604,6 +1604,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
if generics.params.iter().any(|p| p.name != kw::SelfUpper)
|
||||
&& !snippet.ends_with('>')
|
||||
&& !generics.has_impl_trait()
|
||||
&& !self.tcx.fn_trait_kind_from_lang_item(*def_id).is_some()
|
||||
{
|
||||
// FIXME: To avoid spurious suggestions in functions where type arguments
|
||||
// where already supplied, we check the snippet to make sure it doesn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue