rust/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
656 B
Rust
Raw Permalink Normal View History

// ignore-tidy-linelength
// 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};
fn main() {
aux_build().input("stable.rs").emit("metadata").run();
let output =
rustc().input("main.rs").emit("metadata").extern_("stable", "libstable.rmeta").run();
let version = rfs::read_to_string(source_root().join("src/version"));
let expected_string = format!("stable since {}", version.trim());
output.assert_stderr_contains(expected_string);
}