Add deprecation lints if using impl-* feature gates.

This commit is contained in:
Dimitri Sabadie 2023-02-01 19:29:31 +01:00
parent ca8e797932
commit df9815a464
No known key found for this signature in database
2 changed files with 12 additions and 7 deletions

View File

@ -13,12 +13,6 @@ readme = "README.md"
edition = "2021"
[badges]
travis-ci = { repository = "phaazon/splines", branch = "master" }
is-it-maintained-issue-resolution = { repository = "phaazon/splines" }
is-it-maintained-open-issues = { repository = "phaazon/splines" }
maintenance = { status = "actively-developed" }
[features]
default = ["std"]
impl-cgmath = ["cgmath"]
@ -38,7 +32,7 @@ float-cmp = ">=0.6, < 0.10"
serde_json = "1"
[package.metadata.docs.rs]
all-features = true
features = ["std", "cgmath", "glam", "nalgebra", "serde"]
[[example]]
name = "hello-world"

View File

@ -108,6 +108,17 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc))]
#![cfg_attr(not(feature = "std"), feature(core_intrinsics))]
#![cfg_attr(
any(
feature = "impl-cgmath",
feature = "impl-glam",
feature = "impl-nalgebra"
),
deprecated(
since = "4.2.0",
note = "you are using an impl-* feature gate; please switch to * (e.g. impl-cgmath becomes cgmath)"
)
)]
#[cfg(not(feature = "std"))]
extern crate alloc;