// const_slice_from_raw_parts was stabilized in 1.64, however we support building on 1.63 as well.
// Luckily, it seems to work fine in 1.63 with the feature flag (and RUSTC_BOOTSTRAP=1) enabled.
-#![cfg_attr(feature = "validation", allow(stable_features))]
-#![cfg_attr(feature = "validation", feature(const_slice_from_raw_parts))]
+#![cfg_attr(all(feature = "validation", rust_1_63), feature(const_slice_from_raw_parts))]
extern crate alloc;
// const_slice_from_raw_parts was stabilized in 1.64, however we support building on 1.63 as well.
// Luckily, it seems to work fine in 1.63 with the feature flag (and RUSTC_BOOTSTRAP=1) enabled.
-#![allow(stable_features)]
-#![feature(const_slice_from_raw_parts)]
+#![cfg_attr(rust_1_63, feature(const_slice_from_raw_parts))]
#![cfg_attr(not(feature = "std"), no_std)]
extern crate alloc;
#!/bin/sh
set -eox
-export RUSTC_BOOTSTRAP=1
+
+RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
+if [ "$RUSTC_MINOR_VERSION" = 63 ]; then
+ export RUSTC_BOOTSTRAP=1
+ export RUSTFLAGS=--cfg=rust_1_63
+fi
+
cargo test --no-default-features
cargo test
cargo test --no-default-features --features std