mirror of
https://github.com/serde-rs/json.git
synced 2025-10-03 07:46:05 +00:00
Merge pull request 1124 from mleonhard/master
This commit is contained in:
commit
051ce970fe
@ -1 +0,0 @@
|
|||||||
"serde_json requires that either `std` (default) or `alloc` feature is enabled"
|
|
@ -1,13 +0,0 @@
|
|||||||
//! Shows a user-friendly compiler error on incompatible selected features.
|
|
||||||
|
|
||||||
#[allow(unused_macros)]
|
|
||||||
macro_rules! hide_from_rustfmt {
|
|
||||||
($mod:item) => {
|
|
||||||
$mod
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(any(feature = "std", feature = "alloc")))]
|
|
||||||
hide_from_rustfmt! {
|
|
||||||
mod error;
|
|
||||||
}
|
|
@ -363,6 +363,11 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||||
|
|
||||||
|
#[cfg(not(any(feature = "std", feature = "alloc")))]
|
||||||
|
compile_error! {
|
||||||
|
"serde_json requires that either `std` (default) or `alloc` feature is enabled"
|
||||||
|
}
|
||||||
|
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
@ -409,8 +414,6 @@ pub mod ser;
|
|||||||
mod ser;
|
mod ser;
|
||||||
pub mod value;
|
pub mod value;
|
||||||
|
|
||||||
mod features_check;
|
|
||||||
|
|
||||||
mod io;
|
mod io;
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
mod iter;
|
mod iter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user