Skip to content

Commit d71d4aa

Browse files
author
bors-servo
authored
Auto merge of #206 - servo:rustup, r=emilio
Use feature testing over version number parsing. This is more robust, I’m unsure which release this rustc change will go into. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/206) <!-- Reviewable:end -->
2 parents 096bd88 + a95d466 commit d71d4aa

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ smallvec = "0.4.3"
3232
[build-dependencies]
3333
syn = "0.11"
3434
quote = "0.3"
35-
rustc_version = "0.2"
36-
3735
[features]
3836
bench = []
3937
dummy_match_byte = []

build.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
extern crate quote;
66
extern crate syn;
7-
extern crate rustc_version;
87

98
use std::env;
109
use std::path::Path;
@@ -34,14 +33,7 @@ mod codegen {
3433
}
3534

3635
fn main() {
37-
let rustc = rustc_version::version_meta().unwrap();
38-
let commit_date = match rustc.commit_date {
39-
Some(ref s) => &**s,
40-
None => "unknown", // Sorts after a date
41-
};
42-
if (rustc.semver.major, rustc.semver.minor, rustc.semver.patch, commit_date) >=
43-
(1, 23, 0, "2017-11-20")
44-
{
36+
if std::mem::size_of::<Option<bool>>() == 1 {
4537
// https://github.com/rust-lang/rust/pull/45225
4638
println!("cargo:rustc-cfg=rustc_has_pr45225")
4739
}

0 commit comments

Comments
 (0)