@@ -26,6 +26,17 @@ mod hir_opt_tests {
2626 hir_string_proc(&format!("{}.method(:{})", "self", method))
2727 }
2828
29+ // Keep tests for rest-aware SendDirect snapshots focused on argument packing
30+ // even though rest callees are now eligible for the general inliner.
31+ #[track_caller]
32+ fn hir_string_without_inlining(method: &str) -> String {
33+ let old_threshold = get_option!(inline_threshold);
34+ unsafe { OPTIONS.as_mut().unwrap().inline_threshold = 0; }
35+ let result = hir_string(method);
36+ unsafe { OPTIONS.as_mut().unwrap().inline_threshold = old_threshold; }
37+ result
38+ }
39+
2940 #[test]
3041 fn test_fold_iftrue_away() {
3142 eval("
@@ -4008,7 +4019,7 @@ mod hir_opt_tests {
40084019 test
40094020 test
40104021 ");
4011- assert_snapshot!(hir_string ("test"), @"
4022+ assert_snapshot!(hir_string_without_inlining ("test"), @"
40124023 fn test@<compiled>:3:
40134024 bb1():
40144025 EntryPoint interpreter
@@ -4039,7 +4050,7 @@ mod hir_opt_tests {
40394050 test
40404051 test
40414052 ");
4042- assert_snapshot!(hir_string ("test"), @"
4053+ assert_snapshot!(hir_string_without_inlining ("test"), @"
40434054 fn test@<compiled>:3:
40444055 bb1():
40454056 EntryPoint interpreter
@@ -4074,7 +4085,7 @@ mod hir_opt_tests {
40744085 test
40754086 test
40764087 ");
4077- assert_snapshot!(hir_string ("test"), @"
4088+ assert_snapshot!(hir_string_without_inlining ("test"), @"
40784089 fn test@<compiled>:3:
40794090 bb1():
40804091 EntryPoint interpreter
@@ -4105,7 +4116,7 @@ mod hir_opt_tests {
41054116 test
41064117 test
41074118 ");
4108- assert_snapshot!(hir_string ("test"), @"
4119+ assert_snapshot!(hir_string_without_inlining ("test"), @"
41094120 fn test@<compiled>:3:
41104121 bb1():
41114122 EntryPoint interpreter
@@ -4136,7 +4147,7 @@ mod hir_opt_tests {
41364147 test
41374148 test
41384149 ");
4139- assert_snapshot!(hir_string ("test"), @"
4150+ assert_snapshot!(hir_string_without_inlining ("test"), @"
41404151 fn test@<compiled>:3:
41414152 bb1():
41424153 EntryPoint interpreter
@@ -4168,7 +4179,7 @@ mod hir_opt_tests {
41684179 test
41694180 test
41704181 ");
4171- assert_snapshot!(hir_string ("test"), @"
4182+ assert_snapshot!(hir_string_without_inlining ("test"), @"
41724183 fn test@<compiled>:3:
41734184 bb1():
41744185 EntryPoint interpreter
@@ -4199,7 +4210,7 @@ mod hir_opt_tests {
41994210 test
42004211 test
42014212 ");
4202- assert_snapshot!(hir_string ("test"), @"
4213+ assert_snapshot!(hir_string_without_inlining ("test"), @"
42034214 fn test@<compiled>:3:
42044215 bb1():
42054216 EntryPoint interpreter
@@ -4230,7 +4241,7 @@ mod hir_opt_tests {
42304241 test
42314242 test
42324243 ");
4233- assert_snapshot!(hir_string ("test"), @"
4244+ assert_snapshot!(hir_string_without_inlining ("test"), @"
42344245 fn test@<compiled>:3:
42354246 bb1():
42364247 EntryPoint interpreter
0 commit comments