diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-11-28 15:42:10 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-28 15:42:10 +0530 |
| commit | f90484df8ad52f73c4f28cf3e4924c2bfa668a38 (patch) | |
| tree | ca6e48d5fb72c095cd12f7ce47b5a14bf001321f /compiler/rustc_infer | |
| parent | f33d4094f014e10bdfeacc48fbe2368df9a0d18c (diff) | |
| parent | 5ba0056346a745e61cb2cb90d69a3304a255ff42 (diff) | |
| download | rust-f90484df8ad52f73c4f28cf3e4924c2bfa668a38.tar.gz rust-f90484df8ad52f73c4f28cf3e4924c2bfa668a38.zip | |
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`
Diffstat (limited to 'compiler/rustc_infer')
| -rw-r--r-- | compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs index a585168294a..1f554c81eff 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs @@ -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() { |
