From 017c0b5a015e79625034ff47f199095cdf0af6b6 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 18 Jul 2023 09:45:21 +1000 Subject: [PATCH] Add a useful comment. --- compiler/rustc_middle/src/mir/mono.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_middle/src/mir/mono.rs b/compiler/rustc_middle/src/mir/mono.rs index d217e1c5f8f..f4133dfbc95 100644 --- a/compiler/rustc_middle/src/mir/mono.rs +++ b/compiler/rustc_middle/src/mir/mono.rs @@ -56,6 +56,8 @@ impl<'tcx> MonoItem<'tcx> { } } + // Note: if you change how item size estimates work, you might need to + // change NON_INCR_MIN_CGU_SIZE as well. pub fn size_estimate(&self, tcx: TyCtxt<'tcx>) -> usize { match *self { MonoItem::Fn(instance) => {