Skip to content

Commit

Permalink
Fix build on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Dec 27, 2024
1 parent 69c900b commit 5e84380
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ log = "0.4"
once_cell = "1.20"
regex = "1.0"
rustfix = "0.8"
rustversion = "1.0"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
Expand Down
10 changes: 9 additions & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,18 @@ mod config_tempdir {
#[cfg(feature = "tmp")]
pub use self::config_tempdir::ConfigWithTemp;

#[cfg(feature = "rustc")]
#[rustversion::since(2024-11-03)]
use rustc_session::config::host_tuple as host;

#[cfg(feature = "rustc")]
#[rustversion::before(2024-11-03)]
use rustc_session::config::host_triple as host;

impl Default for Config {
fn default() -> Config {
#[cfg(feature = "rustc")]
let platform = rustc_session::config::host_triple().to_string();
let platform = host().to_string();

Config {
bless: false,
Expand Down

0 comments on commit 5e84380

Please sign in to comment.