aliasable/
lib.rs

1//! Basic aliasable (non `core::ptr::Unique`) types.
2//!
3//! # Why?
4//!
5//! Used for escaping `noalias` when multiple raw pointers may point to the same
6//! data.
7
8#![no_std]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10#![forbid(
11    clippy::pedantic,
12    rust_2018_idioms,
13    anonymous_parameters,
14    unused_qualifications,
15    missing_docs,
16    trivial_casts,
17    trivial_numeric_casts,
18    unstable_features,
19    unused_extern_crates,
20    unused_import_braces,
21    unused_results,
22    warnings
23)]
24#![allow(
25    clippy::needless_pass_by_value,
26    clippy::wrong_self_convention,
27    clippy::must_use_candidate,
28    clippy::module_name_repetitions
29)]
30
31#[cfg(any(test, feature = "alloc"))]
32extern crate alloc;
33
34mod mut_ref;
35
36#[cfg(feature = "alloc")]
37pub mod boxed;
38#[cfg(feature = "alloc")]
39pub mod string;
40#[cfg(feature = "alloc")]
41pub mod vec;
42
43pub use crate::mut_ref::AliasableMut;
44
45/// Export of all types enabled.
46pub mod prelude {
47    #[cfg(feature = "alloc")]
48    pub use crate::boxed::*;
49    #[cfg(feature = "alloc")]
50    pub use crate::string::*;
51    #[cfg(feature = "alloc")]
52    pub use crate::vec::*;
53
54    pub use crate::mut_ref::*;
55}
56
57#[cfg(feature = "traits")]
58pub use aliasable_deref_trait::AliasableDeref;
59#[cfg(feature = "traits")]
60pub use stable_deref_trait::StableDeref;