diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-08-03 12:08:50 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-12 20:17:55 +0000 |
| commit | d0cba3df97f43d5e8cf53110cc6800cebdfc4499 (patch) | |
| tree | 644cc03fefcf3a8689ca2b99caacf9e0c3166556 /compiler/rustc_mir_transform/src/const_prop.rs | |
| parent | 108decec53c94d680501cb31890613dc208fb106 (diff) | |
| download | rust-d0cba3df97f43d5e8cf53110cc6800cebdfc4499.tar.gz rust-d0cba3df97f43d5e8cf53110cc6800cebdfc4499.zip | |
Do not fetch type to check generator.
Diffstat (limited to 'compiler/rustc_mir_transform/src/const_prop.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs index c562aa1d3c2..0c44bccbb4f 100644 --- a/compiler/rustc_mir_transform/src/const_prop.rs +++ b/compiler/rustc_mir_transform/src/const_prop.rs @@ -84,9 +84,9 @@ impl<'tcx> MirPass<'tcx> for ConstProp { return; } - let is_generator = tcx.type_of(def_id.to_def_id()).instantiate_identity().is_generator(); // FIXME(welseywiser) const prop doesn't work on generators because of query cycles // computing their layout. + let is_generator = def_kind == DefKind::Generator; if is_generator { trace!("ConstProp skipped for generator {:?}", def_id); return; |
