File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ pub enum GitRepo {
190
190
/// although most functions are implemented as free functions rather than
191
191
/// methods specifically on this structure itself (to make it easier to
192
192
/// organize).
193
- #[ derive( Clone ) ]
193
+ #[ cfg_attr ( not ( feature = "build-metrics" ) , derive( Clone ) ) ]
194
194
pub struct Build {
195
195
/// User-specified configuration from `config.toml`.
196
196
config : Config ,
Original file line number Diff line number Diff line change
1
+ #![ cfg_attr( feature = "build-metrics" , allow( unused) ) ]
2
+
1
3
use std:: str:: FromStr ;
2
4
3
5
use std:: path:: PathBuf ;
@@ -7,7 +9,13 @@ use crate::{
7
9
tool:: Tool ,
8
10
} ;
9
11
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
+
10
17
/// Suggests a list of possible `x.py` commands to run based on modified files in branch.
18
+ #[ cfg( not( feature = "build-metrics" ) ) ]
11
19
pub fn suggest ( builder : & Builder < ' _ > , run : bool ) {
12
20
let suggestions =
13
21
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