Rollup merge of #104732 - WaffleLapkin:from_def_idn't, r=compiler-errors
Refactor `ty::ClosureKind` related stuff I've tried to fix all duplication and weirdness, but if I missed something do tell :p r? `@compiler-errors`
This commit is contained in:
commit
f90484df8a
14 changed files with 46 additions and 62 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_lang_item(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