about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-10 16:31:11 +0000
committerbors <bors@rust-lang.org>2023-09-10 16:31:11 +0000
commit7418413a7fad1c4e8b82f970bd78af030e5f813e (patch)
tree4ccedfe7710b15f869e5bc2ac5fbb2e70f3a90a7 /tests
parent8e37c509fda1f7387895e33783cba94ea3960a29 (diff)
parentd99333e44450914cf8845c55c9d743653138740b (diff)
downloadrust-7418413a7fad1c4e8b82f970bd78af030e5f813e.tar.gz
rust-7418413a7fad1c4e8b82f970bd78af030e5f813e.zip
Auto merge of #115306 - tmiasko:encode-reachable-mir, r=cjgillot
Encode only MIR reachable from other crates

Only reachable items might participate in the code generation in the
downstream crates. Omit redundant optimized MIR of unreachable items
from a crate metadata.

Additionally, include reachable closures in reachable set, so that
unreachable closures can be omitted on the same basis.
Diffstat (limited to 'tests')
-rw-r--r--tests/mir-opt/funky_arms.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/mir-opt/funky_arms.rs b/tests/mir-opt/funky_arms.rs
index 6b4f4c80560..79fd9457ce1 100644
--- a/tests/mir-opt/funky_arms.rs
+++ b/tests/mir-opt/funky_arms.rs
@@ -9,7 +9,7 @@ use core::num::flt2dec;
 use std::fmt::{Formatter, Result};
 
 // EMIT_MIR funky_arms.float_to_exponential_common.ConstProp.diff
-fn float_to_exponential_common<T>(fmt: &mut Formatter<'_>, num: &T, upper: bool) -> Result
+pub fn float_to_exponential_common<T>(fmt: &mut Formatter<'_>, num: &T, upper: bool) -> Result
 where
     T: flt2dec::DecodableFloat,
 {