solar_data_structures/
lib.rs

1#![doc = include_str!("../README.md")]
2#![doc(
3    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/solar/main/assets/logo.png",
4    html_favicon_url = "https://raw.githubusercontent.com/paradigmxyz/solar/main/assets/favicon.ico"
5)]
6#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
7#![cfg_attr(feature = "nightly", feature(core_intrinsics))]
8#![cfg_attr(feature = "nightly", feature(never_type))]
9#![cfg_attr(feature = "nightly", feature(debug_closure_helpers))]
10#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
11#![cfg_attr(feature = "nightly", feature(likely_unlikely))]
12#![cfg_attr(feature = "nightly", allow(internal_features))]
13
14pub mod cycle;
15pub mod fmt;
16pub mod hint;
17pub mod index;
18pub mod map;
19pub mod sync;
20pub mod trustme;
21
22mod bump_ext;
23pub use bump_ext::BumpExt;
24
25mod collect;
26pub use collect::CollectAndApply;
27
28mod never;
29pub use never::Never;
30
31mod drop_guard;
32#[doc(hidden)]
33#[allow(deprecated)]
34pub use drop_guard::OnDrop;
35pub use drop_guard::{DropGuard, defer};
36
37mod interned;
38pub use interned::Interned;
39
40pub use smallvec;
41
42/// This calls the passed function while ensuring it won't be inlined into the caller.
43#[inline(never)]
44#[cold]
45pub fn outline<R>(f: impl FnOnce() -> R) -> R {
46    f()
47}