Skip to content

Commit c4a6d6c

Browse files
committed
Add a check for a minimum rustc version in ff
1 parent 61bd807 commit c4a6d6c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ff/build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
extern crate rustc_version;
2-
use rustc_version::{version_meta, Channel};
2+
use rustc_version::{version, version_meta, Channel, Version};
33

44
fn main() {
55
println!("cargo:rerun-if-changed=build.rs");
@@ -15,4 +15,10 @@ fn main() {
1515
if should_use_asm {
1616
println!("cargo:rustc-cfg=use_asm");
1717
}
18+
19+
// TODO: remove this once RFC 2495 ships
20+
if version().expect("Installed rustc version unparseable!") < Version::parse("1.51.0").unwrap()
21+
{
22+
panic!("This code base uses const generics and requires a Rust compiler version greater or equal to 1.51.0");
23+
}
1824
}

0 commit comments

Comments
 (0)