Review comment.
This commit is contained in:
parent
23d415a484
commit
d88420a52a
@ -783,6 +783,11 @@ fn should_encode_stability(def_kind: DefKind) -> bool {
|
||||
|
||||
/// Whether we should encode MIR.
|
||||
///
|
||||
/// Computing, optimizing and encoding the MIR is a relatively expensive operation.
|
||||
/// We want to avoid this work when not required. Therefore:
|
||||
/// - we only compute `mir_for_ctfe` on items with const-eval semantics;
|
||||
/// - we skip `optimized_mir` for check runs.
|
||||
///
|
||||
/// Return a pair, resp. for CTFE and for LLVM.
|
||||
fn should_encode_mir(tcx: TyCtxt<'_>, def_id: LocalDefId) -> (bool, bool) {
|
||||
match tcx.def_kind(def_id) {
|
||||
|
Loading…
Reference in New Issue
Block a user