1- #![ cfg_attr( not( any ( feature = "std" , doc ) ) , no_std) ]
1+ #![ cfg_attr( not( feature = "std" ) , no_std) ]
22#![ cfg_attr(
3- any( feature = "global" , doc , all( feature = "std" , test) ) ,
3+ any( feature = "global" , all( feature = "std" , test) ) ,
44 feature( once_cell)
55) ]
66#![ feature(
77 doc_cfg,
8+ doc_cfg_hide,
89 generic_associated_types,
910 ptr_metadata,
1011 unsize,
11- option_result_unwrap_unchecked
12+ option_result_unwrap_unchecked,
1213) ]
1314#![ deny( missing_docs) ]
1415
2021//!
2122//! rattish is presently only experimental, and depends on unstable compiler
2223//! features including [`generic_associated_types`], [`ptr_metadata`] and
23- //! [`unsize`]; [`once_cell`] is used by [`DB`] (enabled by the `global`
24- //! feature). Accordingly, a nightly toolchain is required.
24+ //! [`unsize`].
25+ #![ cfg_attr( feature = "global" , doc = "[`once_cell`] is used by [`DB`] (enabled by the `global` feature)." ) ]
26+ //! Accordingly, a nightly toolchain is required.
2527//!
2628//! # Example
2729//! ```rust
9597//! [`ptr_metadata`]: https://doc.rust-lang.org/nightly/unstable-book/library-features/ptr-metadata.html
9698//! [`unsize`]: https://doc.rust-lang.org/nightly/unstable-book/library-features/unsize.html
9799
98- #[ cfg( all( any ( feature = "alloc" , doc ) , not( feature = "std" ) ) ) ]
100+ #[ cfg( all( feature = "alloc" , not( feature = "std" ) ) ) ]
99101extern crate alloc;
100102
101103pub mod container;
@@ -112,7 +114,7 @@ use db::{
112114 TypeDatabaseEntryExt , TypeDatabaseExt ,
113115} ;
114116
115- #[ cfg( any ( feature = "global" , doc ) ) ]
117+ #[ cfg( feature = "global" ) ]
116118use db:: { error:: DatabaseError , hash_map:: DB } ;
117119
118120#[ cfg( feature = "tracing" ) ]
@@ -181,8 +183,7 @@ where
181183{
182184}
183185
184- #[ cfg( any( feature = "global" , doc) ) ]
185- #[ doc( cfg( feature = "global" ) ) ]
186+ #[ cfg( feature = "global" ) ]
186187/// A type whose implementations can be dynamically determined using the global
187188/// [`DB`].
188189pub trait GlobalDynImplements
@@ -201,8 +202,7 @@ where
201202 }
202203}
203204
204- #[ cfg( any( feature = "global" , doc) ) ]
205- #[ doc( cfg( feature = "global" ) ) ]
205+ #[ cfg( feature = "global" ) ]
206206/// A type that can be dynamically cast using the global [`DB`].
207207pub trait GlobalDynCast
208208where
@@ -228,12 +228,10 @@ where
228228 }
229229}
230230
231- #[ cfg( any( feature = "global" , doc) ) ]
232- #[ doc( cfg( feature = "global" ) ) ]
231+ #[ cfg( feature = "global" ) ]
233232impl < P > GlobalDynImplements for P where Self : InnermostTypeId { }
234233
235- #[ cfg( any( feature = "global" , doc) ) ]
236- #[ doc( cfg( feature = "global" ) ) ]
234+ #[ cfg( feature = "global" ) ]
237235impl < P > GlobalDynCast for P
238236where
239237 Self : Pointer + InnermostTypeId ,
0 commit comments