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", allow(internal_features))]
12
13pub mod cycle;
14pub mod fmt;
15pub mod hint;
16pub mod index;
17pub mod map;
18pub mod sync;
19pub mod trustme;
20
21mod bump_ext;
22pub use bump_ext::BumpExt;
23
24mod collect;
25pub use collect::CollectAndApply;
26
27mod never;
28pub use never::Never;
29
30mod on_drop;
31pub use on_drop::{defer, OnDrop};
32
33mod interned;
34pub use interned::Interned;
35
36pub use smallvec;
37
38/// This calls the passed function while ensuring it won't be inlined into the caller.
39#[inline(never)]
40#[cold]
41pub fn outline<R>(f: impl FnOnce() -> R) -> R {
42    f()
43}