Skip to content

Commit 841f4cc

Browse files
committed
Rewrite and rename issue-26092 to rmake
1 parent 40e35d6 commit 841f4cc

File tree

6 files changed

+18
-20
lines changed

6 files changed

+18
-20
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ run-make/issue-20626/Makefile
9999
run-make/issue-22131/Makefile
100100
run-make/issue-25581/Makefile
101101
run-make/issue-26006/Makefile
102-
run-make/issue-26092/Makefile
103102
run-make/issue-28595/Makefile
104103
run-make/issue-33329/Makefile
105104
run-make/issue-35164/Makefile

tests/run-make/issue-26092/Makefile

-6
This file was deleted.

tests/run-make/link-dedup/Makefile

-12
This file was deleted.

tests/run-make/link-dedup/rmake.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
//@ ignore-msvc
99

10+
use run_make_support::rustc;
11+
1012
fn main() {
1113
rustc().input("depa.rs").run();
1214
rustc().input("depb.rs").run();
@@ -28,5 +30,5 @@ fn main() {
2830
let output = String::from_utf8(rustc().input("empty.rs").command_output().stderr).unwrap();
2931
assert!(!output.contains("-ltestb"));
3032
let output = String::from_utf8(rustc().input("empty.rs").command_output().stderr).unwrap();
31-
assert_eq!(output.matches("-ltesta").count, 1);
33+
assert_eq!(output.matches("-ltesta").count(), 1);
3234
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// When an empty output file is passed to rustc, the ensuing error message
2+
// should be clear. However, calling file_stem on an empty path returns None,
3+
// which, when unwrapped, causes a panic, stopping execution of rustc
4+
// and printing an obscure message instead of reaching the helpful
5+
// error message. This test checks that the panic does not occur.
6+
// See https://github.com/rust-lang/rust/pull/26199
7+
8+
use run_make_support::rustc;
9+
10+
fn main() {
11+
let output = String::from_utf8(rustc().output("").input("blank.rs").command_output().stderr)
12+
.unwrap()
13+
.to_lowercase();
14+
assert!(!output.contains("panic"));
15+
}

0 commit comments

Comments
 (0)