use rustc_version::version; fn version_check() { let ver = version().unwrap(); if !(ver.major >= 1 && ver.minor >= 30) { panic!("`errorderive` needs support for custom derive & `std::error::Error::source`, which requires rust version >= 1.30") } } fn main() { version_check(); }