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
|
@ -106,7 +106,7 @@ fn external_generic_args<'tcx>(
|
|||
) -> GenericArgs {
|
||||
let args = substs_to_args(cx, substs, has_self);
|
||||
|
||||
if cx.tcx.fn_trait_kind_from_lang_item(did).is_some() {
|
||||
if cx.tcx.fn_trait_kind_from_def_id(did).is_some() {
|
||||
let inputs =
|
||||
// The trait's first substitution is the one after self, if there is one.
|
||||
match substs.iter().nth(if has_self { 1 } else { 0 }).unwrap().expect_ty().kind() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue