diff --git a/src/datetime/mod.rs b/src/datetime/mod.rs index 1834c1cc6b..6715dfc843 100644 --- a/src/datetime/mod.rs +++ b/src/datetime/mod.rs @@ -3,7 +3,7 @@ //! ISO 8601 date and time with time zone. -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))] use alloc::string::String; use core::borrow::Borrow; use core::cmp::Ordering; diff --git a/src/format/formatting.rs b/src/format/formatting.rs index f3448f94fe..35c253fff1 100644 --- a/src/format/formatting.rs +++ b/src/format/formatting.rs @@ -3,7 +3,7 @@ //! Date and time formatting routines. -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))] use alloc::string::{String, ToString}; #[cfg(feature = "alloc")] use core::borrow::Borrow; @@ -20,8 +20,6 @@ use crate::{NaiveDate, NaiveTime, Weekday}; #[cfg(feature = "alloc")] use super::locales; -#[cfg(all(feature = "unstable-locales", feature = "alloc"))] -use super::Locale; #[cfg(any(feature = "alloc", feature = "serde", feature = "rustc-serialize"))] use super::{Colons, OffsetFormat, OffsetPrecision, Pad}; #[cfg(feature = "alloc")] diff --git a/src/format/mod.rs b/src/format/mod.rs index 75bc02ee31..c2401a7fc1 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -30,7 +30,7 @@ //! # Ok::<(), chrono::ParseError>(()) //! ``` -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))] use alloc::boxed::Box; use core::fmt; use core::str::FromStr; diff --git a/src/format/strftime.rs b/src/format/strftime.rs index 26fa391201..997faa66c7 100644 --- a/src/format/strftime.rs +++ b/src/format/strftime.rs @@ -165,7 +165,7 @@ use super::{locales, Locale}; use super::{Fixed, InternalInternal, Item, Numeric, Pad}; #[cfg(any(feature = "alloc", feature = "std"))] use super::{ParseError, BAD_FORMAT}; -#[cfg(feature = "alloc")] +#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))] use alloc::vec::Vec; /// Parsing iterator for `strftime`-like format strings. diff --git a/src/round.rs b/src/round.rs index d9b1b9bc0e..8a76cb3ddb 100644 --- a/src/round.rs +++ b/src/round.rs @@ -6,7 +6,6 @@ use crate::{DateTime, NaiveDateTime, TimeDelta, TimeZone, Timelike}; use core::cmp::Ordering; use core::fmt; -use core::marker::Sized; use core::ops::{Add, Sub}; /// Extension trait for subsecond rounding or truncation to a maximum number