@@ -723,37 +723,38 @@ fn next_steps(
723723 is_master_commit : bool ,
724724) -> String {
725725 let deserves_attention = deserves_attention_icount ( & primary, & secondary) ;
726- let label = match ( deserves_attention, direction) {
727- ( true , Some ( Direction :: Regression | Direction :: Mixed ) ) => "+perf-regression" ,
728- _ => "-perf-regression" ,
726+ let ( is_regression , label) = match ( deserves_attention, direction) {
727+ ( true , Some ( Direction :: Regression | Direction :: Mixed ) ) => ( true , "+perf-regression" ) ,
728+ _ => ( false , "-perf-regression" ) ,
729729 } ;
730730
731731 if is_master_commit {
732- master_run_body ( label )
732+ master_run_body ( is_regression )
733733 } else {
734734 try_run_body ( label)
735735 }
736736}
737737
738- fn master_run_body ( label : & str ) -> String {
739- let next_steps = if label. starts_with ( "+" ) {
740- "\n \n **Next Steps**: If you can justify the \
741- regressions found in this perf run, please indicate this with \
742- `@rustbot label: +perf-regression-triaged` along with \
743- sufficient written justification. If you cannot justify the regressions \
744- please open an issue or create a new PR that fixes the regressions, \
745- add a comment linking to the newly created issue or PR, \
746- and then add the `perf-regression-triaged` label to this PR."
738+ fn master_run_body ( is_regression : bool ) -> String {
739+ if is_regression {
740+ "
741+ **Next Steps**: If you can justify the \
742+ regressions found in this perf run, please indicate this with \
743+ `@rustbot label: +perf-regression-triaged` along with \
744+ sufficient written justification. If you cannot justify the regressions \
745+ please open an issue or create a new PR that fixes the regressions, \
746+ add a comment linking to the newly created issue or PR, \
747+ and then add the `perf-regression-triaged` label to this PR.
748+
749+ @rustbot label: +perf-regression
750+ cc @rust-lang/wg-compiler-performance
751+ "
747752 } else {
748- ""
749- } ;
750-
751- format ! (
752753 "
753- {next_steps}
754-
755- @rustbot label: {label}" ,
756- )
754+ @rustbot label: -perf-regression
755+ "
756+ }
757+ . to_string ( )
757758}
758759
759760fn try_run_body ( label : & str ) -> String {
0 commit comments