Skip to content

Commit a857e8e

Browse files
committed
rewrite output-with-hyphens to rmake format
1 parent cdc0840 commit a857e8e

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ run-make/optimization-remarks-dir/Makefile
157157
run-make/output-filename-conflicts-with-directory/Makefile
158158
run-make/output-filename-overwrites-input/Makefile
159159
run-make/output-type-permutations/Makefile
160-
run-make/output-with-hyphens/Makefile
161160
run-make/override-aliased-flags/Makefile
162161
run-make/overwrite-input/Makefile
163162
run-make/panic-abort-eh_frame/Makefile

tests/run-make/output-with-hyphens/Makefile

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Rust files with hyphens in their filename should
2+
// not result in compiled libraries keeping that hyphen -
3+
// it should become an underscore. Only bin executables
4+
// should keep the hyphen. This test ensures that this rule
5+
// remains enforced.
6+
// See https://github.com/rust-lang/rust/pull/23786
7+
8+
//@ ignore-cross-compile
9+
10+
use run_make_support::rustc;
11+
use std::path::Path;
12+
13+
fn main() {
14+
rustc().input("foo-bar.rs").crate_type("bin").run();
15+
Path::new(bin_name("foo-bar")).exists();
16+
rustc().input("foo-bar.rs").crate_type("lib").run();
17+
Path::new(bin_name("libfoo_bar.rlib")).exists();
18+
}

0 commit comments

Comments
 (0)