We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61bd807 commit c4a6d6cCopy full SHA for c4a6d6c
ff/build.rs
@@ -1,5 +1,5 @@
1
extern crate rustc_version;
2
-use rustc_version::{version_meta, Channel};
+use rustc_version::{version, version_meta, Channel, Version};
3
4
fn main() {
5
println!("cargo:rerun-if-changed=build.rs");
@@ -15,4 +15,10 @@ fn main() {
15
if should_use_asm {
16
println!("cargo:rustc-cfg=use_asm");
17
}
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
+ }
24
0 commit comments