Skip to content

Commit

Permalink
rewrite error-found-staticlib-instead-crate to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 14, 2024
1 parent f8e5660 commit e9ff47f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ run-make/emit-shared-files/Makefile
run-make/emit-stack-sizes/Makefile
run-make/emit-to-stdout/Makefile
run-make/env-dep-info/Makefile
run-make/error-found-staticlib-instead-crate/Makefile
run-make/error-writing-dependencies/Makefile
run-make/export-executable-symbols/Makefile
run-make/extern-diff-internal-name/Makefile
Expand Down
5 changes: 0 additions & 5 deletions tests/run-make/error-found-staticlib-instead-crate/Makefile

This file was deleted.

11 changes: 11 additions & 0 deletions tests/run-make/error-found-staticlib-instead-crate/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// When rustc is looking for a crate but is given a staticlib instead,
// the error message should be helpful and indicate precisely the cause
// of the compilation failure.
// See https://github.com/rust-lang/rust/pull/21978

use run_make_support::rustc;

fn main() {
rustc().input("foo.rs").crate_type("staticlib").run();
rustc().input("bar.rs").run_fail().assert_stderr_contains("found staticlib");
}

0 comments on commit e9ff47f

Please sign in to comment.