diff options
| author | Michael Goulet <michael@errs.io> | 2024-02-11 21:36:12 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-02-11 22:09:52 +0000 |
| commit | cb024ba6e386242c5bea20fcc613c7edbc48f290 (patch) | |
| tree | 5dfde42fd1ba98d706b782500379a1eb355f85fb /compiler/rustc_const_eval/src/transform | |
| parent | 899c895ba4558737d8e3235b5d864d985bf28e95 (diff) | |
| download | rust-cb024ba6e386242c5bea20fcc613c7edbc48f290.tar.gz rust-cb024ba6e386242c5bea20fcc613c7edbc48f290.zip | |
is_closure_like
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/mod.rs b/compiler/rustc_const_eval/src/transform/check_consts/mod.rs index 98276ff2e68..0eaeb8b8089 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/mod.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/mod.rs @@ -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_or_coroutine(did) { + if self.tcx.is_closure_like(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() |
