is_coroutine -> is_coroutine_or_closure
This commit is contained in:
parent
d59f06fc64
commit
07adee7072
15 changed files with 29 additions and 22 deletions
|
@ -72,7 +72,7 @@ impl<'mir, 'tcx> ConstCx<'mir, 'tcx> {
|
|||
|
||||
pub fn fn_sig(&self) -> PolyFnSig<'tcx> {
|
||||
let did = self.def_id().to_def_id();
|
||||
if self.tcx.is_closure(did) {
|
||||
if self.tcx.is_closure_or_coroutine(did) {
|
||||
let ty = self.tcx.type_of(did).instantiate_identity();
|
||||
let ty::Closure(_, args) = ty.kind() else { bug!("type_of closure not ty::Closure") };
|
||||
args.as_closure().sig()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue