manually_static/
lib.rs

1//! # `ManuallyStatic`
2//!
3//! `ManuallyStatic` is a crate that provides a way to simulate a 'static lifetime
4//! where you want runtime checks for use-after-free in debug environments.
5//!
6//! Read [`ManuallyStatic`'s documentation](ManuallyStatic)
7//! and [`ManuallyStaticPtr`'s documentation](ManuallyStaticPtr) for more information.
8#![deny(clippy::all)]
9#![deny(clippy::assertions_on_result_states)]
10#![deny(clippy::match_wild_err_arm)]
11#![deny(clippy::allow_attributes_without_reason)]
12#![warn(clippy::pedantic)]
13#![warn(clippy::nursery)]
14#![warn(clippy::cargo)]
15#![allow(
16    clippy::missing_const_for_fn,
17    reason = "Since we cannot make a constant function non-constant after its release,
18    we need to look for a reason to make it constant, and not vice versa."
19)]
20#![allow(
21    clippy::must_use_candidate,
22    reason = "It is better to developer think about it."
23)]
24#![allow(
25    clippy::missing_errors_doc,
26    reason = "Unless the error is something special,
27    the developer should document it."
28)]
29
30mod ptr;
31mod stack_and_ref;
32
33pub use ptr::ManuallyStaticPtr;
34pub use stack_and_ref::{ManuallyStatic, ManuallyStaticRef};