1
Fork 0

Remove impl_trait_in_bindings handling on inference error reporting

This commit is contained in:
Santiago Pastorino 2021-07-14 16:55:31 -03:00
parent 4d2d90307d
commit 962ac8183d
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
4 changed files with 2 additions and 120 deletions

View file

@ -491,11 +491,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
span
};
let is_named_and_not_impl_trait = |ty: Ty<'_>| {
&ty.to_string() != "_" &&
// FIXME: Remove this check after `impl_trait_in_bindings` is stabilized. #63527
(!ty.is_impl_trait() || self.tcx.features().impl_trait_in_bindings)
};
let is_named_and_not_impl_trait =
|ty: Ty<'_>| &ty.to_string() != "_" && !ty.is_impl_trait();
let ty_msg = match (local_visitor.found_node_ty, local_visitor.found_exact_method_call) {
(_, Some(_)) => String::new(),