Use TyCtxt::is_fn_trait
is a couple more places
This commit is contained in:
parent
ea447924ce
commit
5ba0056346
2 changed files with 2 additions and 6 deletions
|
@ -399,10 +399,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
|
|||
self_ty.highlight.maybe_highlighting_region(vid, actual_has_vid);
|
||||
|
||||
if self_ty.value.is_closure()
|
||||
&& self
|
||||
.tcx()
|
||||
.fn_trait_kind_from_def_id(expected_trait_ref.value.def_id)
|
||||
.is_some()
|
||||
&& self.tcx().is_fn_trait(expected_trait_ref.value.def_id)
|
||||
{
|
||||
let closure_sig = self_ty.map(|closure| {
|
||||
if let ty::Closure(_, substs) = closure.kind() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue