Skip to content

Commit 2da6bed

Browse files
author
hyd-dev
committed
Use harness = false instead of #![feature(custom_test_frameworks)]
1 parent 41f3fe6 commit 2da6bed

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ colored = "2"
4545
# This crate uses #[feature(rustc_private)].
4646
# See https://github.com/rust-analyzer/rust-analyzer/pull/7891
4747
rustc_private = true
48+
49+
[[test]]
50+
name = "compiletest"
51+
harness = false

tests/compiletest.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#![feature(custom_test_frameworks)]
2-
// Custom test runner, to avoid libtest being wrapped around compiletest which wraps libtest.
3-
#![test_runner(test_runner)]
4-
51
use std::env;
62
use std::path::PathBuf;
73

@@ -83,7 +79,7 @@ fn get_target() -> String {
8379
env::var("MIRI_TEST_TARGET").unwrap_or_else(|_| get_host())
8480
}
8581

86-
fn test_runner(_tests: &[&()]) {
82+
fn main() {
8783
// Add a test env var to do environment communication tests.
8884
env::set_var("MIRI_ENV_VAR_TEST", "0");
8985
// Let the tests know where to store temp files (they might run for a different target, which can make this hard to find).

0 commit comments

Comments
 (0)