@@ -23,6 +23,7 @@ use crate::channel::{self, GitInfo};
23
23
pub use crate :: flags:: Subcommand ;
24
24
use crate :: flags:: { Color , Flags , Warnings } ;
25
25
use crate :: util:: { exe, output, t} ;
26
+ use build_helper:: detail_exit_macro;
26
27
use once_cell:: sync:: OnceCell ;
27
28
use serde:: { Deserialize , Deserializer } ;
28
29
use serde_derive:: Deserialize ;
@@ -579,7 +580,7 @@ macro_rules! define_config {
579
580
panic!( "overriding existing option" )
580
581
} else {
581
582
eprintln!( "overriding existing option: `{}`" , stringify!( $field) ) ;
582
- crate :: detail_exit ( 2 ) ;
583
+ detail_exit_macro! ( 2 ) ;
583
584
}
584
585
} else {
585
586
self . $field = other. $field;
@@ -678,7 +679,7 @@ impl<T> Merge for Option<T> {
678
679
panic ! ( "overriding existing option" )
679
680
} else {
680
681
eprintln ! ( "overriding existing option" ) ;
681
- crate :: detail_exit ( 2 ) ;
682
+ detail_exit_macro ! ( 2 ) ;
682
683
}
683
684
} else {
684
685
* self = other;
@@ -944,7 +945,7 @@ impl Config {
944
945
. and_then ( |table : toml:: Value | TomlConfig :: deserialize ( table) )
945
946
. unwrap_or_else ( |err| {
946
947
eprintln ! ( "failed to parse TOML configuration '{}': {err}" , file. display( ) ) ;
947
- crate :: detail_exit ( 2 ) ;
948
+ detail_exit_macro ! ( 2 ) ;
948
949
} )
949
950
}
950
951
Self :: parse_inner ( args, get_toml)
@@ -978,7 +979,7 @@ impl Config {
978
979
eprintln ! (
979
980
"Cannot use both `llvm_bolt_profile_generate` and `llvm_bolt_profile_use` at the same time"
980
981
) ;
981
- crate :: detail_exit ( 1 ) ;
982
+ detail_exit_macro ! ( 1 ) ;
982
983
}
983
984
984
985
// Infer the rest of the configuration.
@@ -1094,7 +1095,7 @@ impl Config {
1094
1095
}
1095
1096
}
1096
1097
eprintln ! ( "failed to parse override `{option}`: `{err}" ) ;
1097
- crate :: detail_exit ( 2 )
1098
+ detail_exit_macro ! ( 2 )
1098
1099
}
1099
1100
toml. merge ( override_toml, ReplaceOpt :: Override ) ;
1100
1101
@@ -1810,7 +1811,7 @@ impl Config {
1810
1811
println ! ( "help: maybe your repository history is too shallow?" ) ;
1811
1812
println ! ( "help: consider disabling `download-rustc`" ) ;
1812
1813
println ! ( "help: or fetch enough history to include one upstream commit" ) ;
1813
- crate :: detail_exit ( 1 ) ;
1814
+ crate :: detail_exit_macro! ( 1 ) ;
1814
1815
}
1815
1816
1816
1817
// Warn if there were changes to the compiler or standard library since the ancestor commit.
0 commit comments