Skip to content

Commit

Permalink
Fix running roundtrip tests against dev build of rustc
Browse files Browse the repository at this point in the history
The version printed by `rustc +dev --version` in fact ends
with "-dev\n", not "-dev".
  • Loading branch information
dtolnay committed Dec 7, 2023
1 parent 46e0089 commit 0f2fc2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ fn rustc_version() -> Option<Compiler> {
return None;
}
let minor = pieces.next()?.parse().ok()?;
let nightly = version.contains("nightly") || version.ends_with("-dev");
let nightly = version.contains("nightly") || version.trim_end().ends_with("-dev");
Some(Compiler { minor, nightly })
}

0 comments on commit 0f2fc2a

Please sign in to comment.