File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ pub enum GitRepo {
190190/// although most functions are implemented as free functions rather than
191191/// methods specifically on this structure itself (to make it easier to
192192/// organize).
193- #[ derive( Clone ) ]
193+ #[ cfg_attr ( not ( feature = "build-metrics" ) , derive( Clone ) ) ]
194194pub struct Build {
195195 /// User-specified configuration from `config.toml`.
196196 config : Config ,
Original file line number Diff line number Diff line change 1+ #![ cfg_attr( feature = "build-metrics" , allow( unused) ) ]
2+
13use std:: str:: FromStr ;
24
35use std:: path:: PathBuf ;
@@ -7,7 +9,13 @@ use crate::{
79 tool:: Tool ,
810} ;
911
12+ #[ cfg( feature = "build-metrics" ) ]
13+ pub fn suggest ( builder : & Builder < ' _ > , run : bool ) {
14+ panic ! ( "`x suggest` is not supported with `build-metrics`" )
15+ }
16+
1017/// Suggests a list of possible `x.py` commands to run based on modified files in branch.
18+ #[ cfg( not( feature = "build-metrics" ) ) ]
1119pub fn suggest ( builder : & Builder < ' _ > , run : bool ) {
1220 let suggestions =
1321 builder. tool_cmd ( Tool :: SuggestTests ) . output ( ) . expect ( "failed to run `suggest-tests` tool" ) ;
You can’t perform that action at this time.
0 commit comments