Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit f97d0a6

Browse files
authored
Merge pull request #57 from crawford/build
Support dev channels of rustc
2 parents 9dae9c2 + 2c24768 commit f97d0a6

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

build.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@ use std::path::PathBuf;
99
use chrono::NaiveDate;
1010

1111
fn main() {
12-
let date: NaiveDate = rustc_version::version_meta()
13-
.unwrap()
14-
.commit_date
15-
.unwrap()
16-
.parse()
17-
.unwrap();
18-
19-
if date > NaiveDate::from_ymd(2017, 12, 26) {
12+
let meta = rustc_version::version_meta().unwrap();
13+
if meta.channel == rustc_version::Channel::Dev
14+
|| meta.commit_date.unwrap().parse::<NaiveDate>().unwrap()
15+
> NaiveDate::from_ymd(2017, 12, 26)
16+
{
2017
println!("cargo:rustc-cfg=has_termination_lang")
2118
}
2219

0 commit comments

Comments
 (0)