Rollup merge of #119969 - compiler-errors:simplify-closure-env-ty, r=oli-obk
Simplify `closure_env_ty` and `closure_env_param` Random cleanup that I found when working on async closures. This makes it easier to separate the latter into a new tykind.
This commit is contained in:
commit
4735171667
4 changed files with 40 additions and 54 deletions
|
@ -83,7 +83,11 @@ fn fn_sig_for_fn_abi<'tcx>(
|
|||
kind: ty::BoundRegionKind::BrEnv,
|
||||
};
|
||||
let env_region = ty::Region::new_bound(tcx, ty::INNERMOST, br);
|
||||
let env_ty = tcx.closure_env_ty(def_id, args, env_region).unwrap();
|
||||
let env_ty = tcx.closure_env_ty(
|
||||
Ty::new_closure(tcx, def_id, args),
|
||||
args.as_closure().kind(),
|
||||
env_region,
|
||||
);
|
||||
|
||||
let sig = sig.skip_binder();
|
||||
ty::Binder::bind_with_vars(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue