Skip to content

Commit

Permalink
feat: use rust toolchain specified in build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
BD103 committed Oct 4, 2024
1 parent 13e3b49 commit f58bd11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bevy_lint/tests/ui.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::path::{Path, PathBuf};
use ui_test::{color_eyre::{self, eyre::ensure}, run_tests, CommandBuilder, Config};

// This is set by `build.rs`. It is the version specified in `rust-toolchain.toml`.
const RUST_TOOLCHAIN_CHANNEL: &str = env!("RUST_TOOLCHAIN_CHANNEL");

fn main() -> color_eyre::Result<()> {
let config = config()?;
run_tests(config)
Expand All @@ -24,8 +27,7 @@ fn config() -> color_eyre::Result<Config> {
program: "rustup".into(),
args: vec![
"run".into(),
// TODO: Use `build.rs` to change this dynamically.
"nightly-2024-08-21".into(),
RUST_TOOLCHAIN_CHANNEL.into(),
DRIVER_PATH.into(),
// `bevy_lint_driver` expects the first argument to be the path to `rustc`.
"rustc".into(),
Expand Down

0 comments on commit f58bd11

Please sign in to comment.