Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename nightly_const_generics to rustc_1_55 and remove feature gate #149

Merged
merged 1 commit into from
Sep 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,27 @@ grab_spare_slice = []
# DoubleEndedIterator::nth_back - 1.40
rustc_1_40 = []

# features that require rustc 1.55
# use const generics to implement Array for all array lengths
rustc_1_55 = []

# allow use of nightly feature `slice_partition_dedup`,
# will become useless once that is stabilized:
# https://github.com/rust-lang/rust/issues/54279
nightly_slice_partition_dedup = []

# use const generics for arrays
nightly_const_generics = []

# EXPERIMENTAL: Not part of SemVer. It adds `core::fmt::Write` to `ArrayVec`
# and `SliceVec`. It works on Stable Rust, but Vec normally supports the
# `std::io::Write` trait instead of `core::fmt::Write`, so we're keeping it as
# an experimental impl only for now.
experimental_write_impl = []

[package.metadata.docs.rs]
features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"]
features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
rustdoc-args = ["--cfg","docs_rs"]

[package.metadata.playground]
features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"]
features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]

[profile.test]
opt-level = 3
Expand Down
6 changes: 3 additions & 3 deletions src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
///
/// You are generally **not** expected to need to implement this yourself. It is
/// already implemented for all the major array lengths (`0..=32` and the powers
/// of 2 up to 4,096).
/// of 2 up to 4,096), or for all array lengths with the feature `rustc_1_55`.
///
/// **Additional lengths can easily be added upon request.**
///
Expand Down Expand Up @@ -41,8 +41,8 @@ pub trait Array {
fn default() -> Self;
}

#[cfg(feature = "nightly_const_generics")]
#[cfg(feature = "rustc_1_55")]
mod const_generic_impl;

#[cfg(not(feature = "nightly_const_generics"))]
#[cfg(not(feature = "rustc_1_55"))]
mod generated_impl;
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
feature = "nightly_slice_partition_dedup",
feature(slice_partition_dedup)
)]
#![cfg_attr(
feature = "nightly_const_generics",
feature(min_const_generics, array_map)
)]
#![cfg_attr(docs_rs, feature(doc_cfg))]
#![warn(clippy::missing_inline_in_public_items)]
#![warn(clippy::must_use_candidate)]
Expand Down