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:
Dylan DPC 2022-11-28 15:42:10 +05:30 committed by GitHub
commit f90484df8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 46 additions and 62 deletions

View file

@ -209,7 +209,7 @@ fn resolve_associated_item<'tcx>(
substs: future_data.substs,
}),
traits::ImplSource::Closure(closure_data) => {
let trait_closure_kind = tcx.fn_trait_kind_from_lang_item(trait_id).unwrap();
let trait_closure_kind = tcx.fn_trait_kind_from_def_id(trait_id).unwrap();
Instance::resolve_closure(
tcx,
closure_data.closure_def_id,