feat(error): implement Error::source when available

Closes #1768
This commit is contained in:
Steven Fackler
2019-02-27 13:18:02 -08:00
committed by Sean McArthur
parent 0bf30ccc68
commit 4cf22dfa21
3 changed files with 22 additions and 0 deletions

9
build.rs Normal file
View File

@@ -0,0 +1,9 @@
extern crate rustc_version;
use rustc_version::{version, Version};
fn main() {
if version().unwrap() >= Version::parse("1.30.0").unwrap() {
println!("cargo:rustc-cfg=error_source");
}
}