Skip to content

Commit 441972d

Browse files
committed
Rename detail_exit_macro to exit
`detail` and `macro` weren't adding any info.
1 parent 33a2c24 commit 441972d

File tree

15 files changed

+39
-37
lines changed

15 files changed

+39
-37
lines changed

src/bootstrap/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ impl StepDescription {
358358
eprintln!(
359359
"note: if you are adding a new Step to bootstrap itself, make sure you register it with `describe!`"
360360
);
361-
crate::detail_exit_macro!(1);
361+
crate::exit!(1);
362362
}
363363
}
364364
}
@@ -1338,7 +1338,7 @@ impl<'a> Builder<'a> {
13381338
"error: `x.py clippy` requires a host `rustc` toolchain with the `clippy` component"
13391339
);
13401340
eprintln!("help: try `rustup component add clippy`");
1341-
crate::detail_exit_macro!(1);
1341+
crate::exit!(1);
13421342
});
13431343
if !t!(std::str::from_utf8(&output.stdout)).contains("nightly") {
13441344
rustflags.arg("--cfg=bootstrap");

src/bootstrap/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ pub fn run_cargo(
18261826
});
18271827

18281828
if !ok {
1829-
crate::detail_exit_macro!(1);
1829+
crate::exit!(1);
18301830
}
18311831

18321832
// Ok now we need to actually find all the files listed in `toplevel`. We've

src/bootstrap/config.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::channel::{self, GitInfo};
2323
pub use crate::flags::Subcommand;
2424
use crate::flags::{Color, Flags, Warnings};
2525
use crate::util::{exe, output, t};
26-
use build_helper::detail_exit_macro;
26+
use build_helper::exit;
2727
use once_cell::sync::OnceCell;
2828
use semver::Version;
2929
use serde::{Deserialize, Deserializer};
@@ -646,7 +646,7 @@ macro_rules! define_config {
646646
panic!("overriding existing option")
647647
} else {
648648
eprintln!("overriding existing option: `{}`", stringify!($field));
649-
detail_exit_macro!(2);
649+
exit!(2);
650650
}
651651
} else {
652652
self.$field = other.$field;
@@ -745,7 +745,7 @@ impl<T> Merge for Option<T> {
745745
panic!("overriding existing option")
746746
} else {
747747
eprintln!("overriding existing option");
748-
detail_exit_macro!(2);
748+
exit!(2);
749749
}
750750
} else {
751751
*self = other;
@@ -1101,7 +1101,7 @@ impl Config {
11011101
.and_then(|table: toml::Value| TomlConfig::deserialize(table))
11021102
.unwrap_or_else(|err| {
11031103
eprintln!("failed to parse TOML configuration '{}': {err}", file.display());
1104-
detail_exit_macro!(2);
1104+
exit!(2);
11051105
})
11061106
}
11071107
Self::parse_inner(args, get_toml)
@@ -1135,7 +1135,7 @@ impl Config {
11351135
eprintln!(
11361136
"Cannot use both `llvm_bolt_profile_generate` and `llvm_bolt_profile_use` at the same time"
11371137
);
1138-
detail_exit_macro!(1);
1138+
exit!(1);
11391139
}
11401140

11411141
// Infer the rest of the configuration.
@@ -1259,7 +1259,7 @@ impl Config {
12591259
}
12601260
}
12611261
eprintln!("failed to parse override `{option}`: `{err}");
1262-
detail_exit_macro!(2)
1262+
exit!(2)
12631263
}
12641264
toml.merge(override_toml, ReplaceOpt::Override);
12651265

@@ -2007,7 +2007,7 @@ impl Config {
20072007
"Unexpected rustc version: {}, we should use {}/{} to build source with {}",
20082008
rustc_version, prev_version, source_version, source_version
20092009
);
2010-
detail_exit_macro!(1);
2010+
exit!(1);
20112011
}
20122012
}
20132013

@@ -2043,7 +2043,7 @@ impl Config {
20432043
println!("help: maybe your repository history is too shallow?");
20442044
println!("help: consider disabling `download-rustc`");
20452045
println!("help: or fetch enough history to include one upstream commit");
2046-
crate::detail_exit_macro!(1);
2046+
crate::exit!(1);
20472047
}
20482048

20492049
// Warn if there were changes to the compiler or standard library since the ancestor commit.

src/bootstrap/download.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl Config {
248248
if !help_on_error.is_empty() {
249249
eprintln!("{}", help_on_error);
250250
}
251-
crate::detail_exit_macro!(1);
251+
crate::exit!(1);
252252
}
253253
}
254254

src/bootstrap/flags.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl Flags {
193193
} else {
194194
panic!("No paths available for subcommand `{}`", subcommand.as_str());
195195
}
196-
crate::detail_exit_macro!(0);
196+
crate::exit!(0);
197197
}
198198

199199
Flags::parse_from(it)
@@ -538,7 +538,7 @@ pub fn get_completion<G: clap_complete::Generator>(shell: G, path: &Path) -> Opt
538538
} else {
539539
std::fs::read_to_string(path).unwrap_or_else(|_| {
540540
eprintln!("couldn't read {}", path.display());
541-
crate::detail_exit_macro!(1)
541+
crate::exit!(1)
542542
})
543543
};
544544
let mut buf = Vec::new();

src/bootstrap/format.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn rustfmt(src: &Path, rustfmt: &Path, paths: &[PathBuf], check: bool) -> impl F
4040
code, run `./x.py fmt` instead.",
4141
cmd_debug,
4242
);
43-
crate::detail_exit_macro!(1);
43+
crate::exit!(1);
4444
}
4545
true
4646
}
@@ -196,7 +196,7 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
196196

197197
let rustfmt_path = build.initial_rustfmt().unwrap_or_else(|| {
198198
eprintln!("./x.py fmt is not supported on this channel");
199-
crate::detail_exit_macro!(1);
199+
crate::exit!(1);
200200
});
201201
assert!(rustfmt_path.exists(), "{}", rustfmt_path.display());
202202
let src = build.src.clone();

src/bootstrap/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use std::process::{Command, Stdio};
2727
use std::str;
2828

2929
use build_helper::ci::{gha, CiEnv};
30-
use build_helper::detail_exit_macro;
30+
use build_helper::exit;
3131
use channel::GitInfo;
3232
use config::{DryRun, Target};
3333
use filetime::FileTime;
@@ -711,7 +711,7 @@ impl Build {
711711
for failure in failures.iter() {
712712
eprintln!(" - {}\n", failure);
713713
}
714-
detail_exit_macro!(1);
714+
exit!(1);
715715
}
716716

717717
#[cfg(feature = "build-metrics")]
@@ -1515,7 +1515,7 @@ impl Build {
15151515
"Error: Unable to find the stamp file {}, did you try to keep a nonexistent build stage?",
15161516
stamp.display()
15171517
);
1518-
crate::detail_exit_macro!(1);
1518+
crate::exit!(1);
15191519
}
15201520

15211521
let mut paths = Vec::new();
@@ -1707,7 +1707,7 @@ Alternatively, set `download-ci-llvm = true` in that `[llvm]` section
17071707
to download LLVM rather than building it.
17081708
"
17091709
);
1710-
detail_exit_macro!(1);
1710+
exit!(1);
17111711
}
17121712
}
17131713

src/bootstrap/render_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub(crate) fn try_run_tests(builder: &Builder<'_>, cmd: &mut Command, stream: bo
3030

3131
if !run_tests(builder, cmd, stream) {
3232
if builder.fail_fast {
33-
crate::detail_exit_macro!(1);
33+
crate::exit!(1);
3434
} else {
3535
let mut failures = builder.delayed_failures.borrow_mut();
3636
failures.push(format!("{cmd:?}"));

src/bootstrap/sanity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ You should install cmake, or set `download-ci-llvm = true` in the
104104
than building it.
105105
"
106106
);
107-
crate::detail_exit_macro!(1);
107+
crate::exit!(1);
108108
}
109109
}
110110

src/bootstrap/setup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ fn setup_config_toml(path: &PathBuf, profile: Profile, config: &Config) {
203203
"note: this will use the configuration in {}",
204204
profile.include_path(&config.src).display()
205205
);
206-
crate::detail_exit_macro!(1);
206+
crate::exit!(1);
207207
}
208208

209209
let settings = format!(
@@ -389,7 +389,7 @@ pub fn interactive_path() -> io::Result<Profile> {
389389
io::stdin().read_line(&mut input)?;
390390
if input.is_empty() {
391391
eprintln!("EOF on stdin, when expecting answer to question. Giving up.");
392-
crate::detail_exit_macro!(1);
392+
crate::exit!(1);
393393
}
394394
break match parse_with_abbrev(&input) {
395395
Ok(profile) => profile,

0 commit comments

Comments
 (0)