@@ -23,6 +23,7 @@ use crate::channel::{self, GitInfo};
2323pub use crate :: flags:: Subcommand ;
2424use crate :: flags:: { Color , Flags , Warnings } ;
2525use crate :: util:: { exe, output, t} ;
26+ use build_helper:: detail_exit_macro;
2627use once_cell:: sync:: OnceCell ;
2728use serde:: { Deserialize , Deserializer } ;
2829use serde_derive:: Deserialize ;
@@ -579,7 +580,7 @@ macro_rules! define_config {
579580 panic!( "overriding existing option" )
580581 } else {
581582 eprintln!( "overriding existing option: `{}`" , stringify!( $field) ) ;
582- crate :: detail_exit ( 2 ) ;
583+ detail_exit_macro! ( 2 ) ;
583584 }
584585 } else {
585586 self . $field = other. $field;
@@ -678,7 +679,7 @@ impl<T> Merge for Option<T> {
678679 panic ! ( "overriding existing option" )
679680 } else {
680681 eprintln ! ( "overriding existing option" ) ;
681- crate :: detail_exit ( 2 ) ;
682+ detail_exit_macro ! ( 2 ) ;
682683 }
683684 } else {
684685 * self = other;
@@ -944,7 +945,7 @@ impl Config {
944945 . and_then ( |table : toml:: Value | TomlConfig :: deserialize ( table) )
945946 . unwrap_or_else ( |err| {
946947 eprintln ! ( "failed to parse TOML configuration '{}': {err}" , file. display( ) ) ;
947- crate :: detail_exit ( 2 ) ;
948+ detail_exit_macro ! ( 2 ) ;
948949 } )
949950 }
950951 Self :: parse_inner ( args, get_toml)
@@ -978,7 +979,7 @@ impl Config {
978979 eprintln ! (
979980 "Cannot use both `llvm_bolt_profile_generate` and `llvm_bolt_profile_use` at the same time"
980981 ) ;
981- crate :: detail_exit ( 1 ) ;
982+ detail_exit_macro ! ( 1 ) ;
982983 }
983984
984985 // Infer the rest of the configuration.
@@ -1094,7 +1095,7 @@ impl Config {
10941095 }
10951096 }
10961097 eprintln ! ( "failed to parse override `{option}`: `{err}" ) ;
1097- crate :: detail_exit ( 2 )
1098+ detail_exit_macro ! ( 2 )
10981099 }
10991100 toml. merge ( override_toml, ReplaceOpt :: Override ) ;
11001101
@@ -1810,7 +1811,7 @@ impl Config {
18101811 println ! ( "help: maybe your repository history is too shallow?" ) ;
18111812 println ! ( "help: consider disabling `download-rustc`" ) ;
18121813 println ! ( "help: or fetch enough history to include one upstream commit" ) ;
1813- crate :: detail_exit ( 1 ) ;
1814+ crate :: detail_exit_macro! ( 1 ) ;
18141815 }
18151816
18161817 // Warn if there were changes to the compiler or standard library since the ancestor commit.
0 commit comments