Skip to content

Commit e4a3c89

Browse files
committed
share code between used-item-visit and mentioned-item-visit logic
1 parent aa7dd32 commit e4a3c89

File tree

6 files changed

+191
-143
lines changed

6 files changed

+191
-143
lines changed

compiler/rustc_mir_transform/src/mentioned_items.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ impl<'tcx> MirPass<'tcx> for MentionedItems {
1818
// 'mentioned' items, so if some item X gets compiled without optimizations but later called
1919
// from somewhere that has optimizations enabled, we need the `mentioned_items` of X to be
2020
// filled.
21+
// Furthermore, even debug builds use level 1, so special-casing level 0 is just not worth it.
2122
true
2223
}
2324

0 commit comments

Comments
 (0)