2024-01-20 10:51:59 -06:00
|
|
|
// ignore-tidy-linelength
|
|
|
|
|
2024-03-13 16:52:23 -05:00
|
|
|
// Check that the `CURRENT_RUSTC_VERSION` placeholder is correctly replaced by the current
|
|
|
|
// `rustc` version and the `since` property in feature stability gating is properly respected.
|
|
|
|
|
2024-07-17 08:31:38 -05:00
|
|
|
use run_make_support::{aux_build, rfs, rustc, source_root};
|
2024-01-20 10:51:59 -06:00
|
|
|
|
|
|
|
fn main() {
|
2024-03-13 16:52:23 -05:00
|
|
|
aux_build().input("stable.rs").emit("metadata").run();
|
|
|
|
|
2024-06-07 08:23:10 -05:00
|
|
|
let output =
|
|
|
|
rustc().input("main.rs").emit("metadata").extern_("stable", "libstable.rmeta").run();
|
2024-07-17 07:42:06 -05:00
|
|
|
let version = rfs::read_to_string(source_root().join("src/version"));
|
2024-01-20 10:51:59 -06:00
|
|
|
let expected_string = format!("stable since {}", version.trim());
|
2024-06-07 08:23:10 -05:00
|
|
|
output.assert_stderr_contains(expected_string);
|
2024-01-20 10:51:59 -06:00
|
|
|
}
|