We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3130990 commit a1e9fcbCopy full SHA for a1e9fcb
compiler/rustc_mir_transform/src/instsimplify.rs
@@ -45,7 +45,12 @@ impl<'tcx> MirPass<'tcx> for InstSimplify {
45
};
46
let preserve_ub_checks =
47
attr::contains_name(tcx.hir().krate_attrs(), sym::rustc_preserve_ub_checks);
48
- let remove_ub_checks = tcx.has_attr(def_id, sym::rustc_no_ubchecks);
+ // FIXME(async_closures) tcx.has_attr on async closures seems to ICE. Not sure why.
49
+ let remove_ub_checks = if tcx.is_coroutine(def_id) {
50
+ false
51
+ } else {
52
+ tcx.has_attr(def_id, sym::rustc_no_ubchecks)
53
+ };
54
for block in body.basic_blocks.as_mut() {
55
for statement in block.statements.iter_mut() {
56
match statement.kind {
0 commit comments