Skip to content

Commit 25dc750

Browse files
committed
Replace features_check mod with a call to std::compile_error!. Fixes #1123 .
1 parent 2e15e3d commit 25dc750

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

src/features_check/error.rs

-1
This file was deleted.

src/features_check/mod.rs

-13
This file was deleted.

src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@
363363
#![no_std]
364364
#![cfg_attr(docsrs, feature(doc_cfg))]
365365

366+
#[cfg(not(any(feature = "std", feature = "alloc")))]
367+
compile_error!("serde_json requires that either `std` (default) or `alloc` feature is enabled");
368+
366369
extern crate alloc;
367370

368371
#[cfg(feature = "std")]
@@ -409,8 +412,6 @@ pub mod ser;
409412
mod ser;
410413
pub mod value;
411414

412-
mod features_check;
413-
414415
mod io;
415416
#[cfg(feature = "std")]
416417
mod iter;

0 commit comments

Comments
 (0)