Skip to content

Commit b2cd337

Browse files
committed
remove leading comma from macro expansion
1 parent c495558 commit b2cd337

File tree

4 files changed

+7
-25
lines changed

4 files changed

+7
-25
lines changed

src/bootstrap/bootstrap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,8 +934,8 @@ def main():
934934
if len(sys.argv) > 1 and sys.argv[1] == 'help':
935935
sys.argv = [sys.argv[0], '-h'] + sys.argv[2:]
936936

937-
help_triggered = (
938-
'-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
937+
# help_triggered = ('-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
938+
help_triggered = len(sys.argv) == 1 or any(x in ["-h", "--help", "--version"] for x in sys.argv)
939939
try:
940940
bootstrap(help_triggered)
941941
if not help_triggered:

src/tools/tidy/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ pub mod ui_tests;
6969
pub mod unit_tests;
7070
pub mod unstable_book;
7171
pub mod walk;
72-
pub mod x;
72+
pub mod x_version;

src/tools/tidy/src/main.rs

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,34 +53,18 @@ fn main() {
5353
VecDeque::with_capacity(concurrency.get());
5454

5555
macro_rules! check {
56-
($p:ident) => {
57-
while handles.len() >= concurrency.get() {
58-
handles.pop_front().unwrap().join().unwrap();
59-
}
60-
61-
let handle = s.spawn(|| {
62-
let mut flag = false;
63-
$p::check(&mut flag);
64-
if (flag) {
65-
bad.store(true, Ordering::Relaxed);
66-
}
67-
});
68-
handles.push_back(handle);
69-
};
70-
7156
($p:ident $(, $args:expr)* ) => {
7257
drain_handles(&mut handles);
7358

7459
let handle = s.spawn(|| {
7560
let mut flag = false;
76-
$p::check($($args),* , &mut flag);
61+
$p::check($($args, )* &mut flag);
7762
if (flag) {
7863
bad.store(true, Ordering::Relaxed);
7964
}
8065
});
8166
handles.push_back(handle);
82-
};
83-
67+
}
8468
}
8569

8670
check!(target_specific_tests, &src_path);
@@ -123,7 +107,7 @@ fn main() {
123107
check!(alphabetical, &compiler_path);
124108
check!(alphabetical, &library_path);
125109

126-
check!(x);
110+
check!(x_version);
127111

128112
let collected = {
129113
drain_handles(&mut handles);

src/tools/tidy/src/x.rs renamed to src/tools/tidy/src/x_version.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
use std::process::Command;
22

33
pub fn check(_bad: &mut bool) {
4-
let result = Command::new("x")
5-
.arg("--version")
6-
.output();
4+
let result = Command::new("x").arg("--version").output();
75
let output = match result {
86
Ok(output) => output,
97
Err(_e) => todo!(),

0 commit comments

Comments
 (0)