blob: f13733af3d0d18a04244d716541c232c85700347 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// this file solely exists to test constants defined in foreign crates.
// As the most common case is the `http` crate, it replicates `http::HeadewrName`'s structure.
#![allow(clippy::declare_interior_mutable_const)]
#![allow(unused_tuple_struct_fields)]
use std::sync::atomic::AtomicUsize;
enum Private<T> {
ToBeUnfrozen(T),
Frozen(usize),
}
pub struct Wrapper(Private<AtomicUsize>);
pub const WRAPPED_PRIVATE_UNFROZEN_VARIANT: Wrapper = Wrapper(Private::ToBeUnfrozen(AtomicUsize::new(6)));
pub const WRAPPED_PRIVATE_FROZEN_VARIANT: Wrapper = Wrapper(Private::Frozen(7));
|