Skip to content

Commit 2cf3949

Browse files
committed
actually, we can use a plain constant
1 parent 0f43321 commit 2cf3949

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/compiletest.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(slice_concat_ext, const_fn)]
1+
#![feature(slice_concat_ext)]
22

33
extern crate compiletest_rs as compiletest;
44

@@ -13,15 +13,13 @@ macro_rules! eprintln {
1313
}
1414
}
1515

16-
const fn miri_path() -> &'static str {
17-
concat!("target/", env!("PROFILE"), "/miri")
18-
}
16+
const MIRI_PATH: &'static str = concat!("target/", env!("PROFILE"), "/miri");
1917

2018
fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: bool) {
2119
eprintln!("## Running compile-fail tests in {} against miri for target {}", path, target);
2220
let mut config = compiletest::default_config();
2321
config.mode = "compile-fail".parse().expect("Invalid mode");
24-
config.rustc_path = miri_path().into();
22+
config.rustc_path = MIRI_PATH.into();
2523
if fullmir {
2624
if host != target {
2725
// skip fullmir on nonhost
@@ -60,7 +58,7 @@ fn miri_pass(path: &str, target: &str, host: &str, fullmir: bool, opt: bool) {
6058
config.src_base = PathBuf::from(path);
6159
config.target = target.to_owned();
6260
config.host = host.to_owned();
63-
config.rustc_path = miri_path().into();
61+
config.rustc_path = MIRI_PATH.into();
6462
let mut flags = Vec::new();
6563
if fullmir {
6664
if host != target {

0 commit comments

Comments
 (0)