We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b53e88 commit 4761d5cCopy full SHA for 4761d5c
src/safety/register_fit.rs
@@ -11,15 +11,22 @@ mod private {
11
#[derive(PartialEq, Eq, core::marker::ConstParamTy)]
12
pub enum TypeSize {
13
TypeFitsInto64Bits,
14
+ // FIXME: ConstParamTy variant with str ICEs in rustdoc
15
+ #[cfg(not(doc))]
16
TypeExeceeds64Bits(&'static str),
17
+ #[cfg(doc)]
18
+ TypeExeceeds64Bits,
19
}
20
21
impl TypeSize {
22
pub const fn check<T>() -> Self {
23
if core::mem::size_of::<T>() <= core::mem::size_of::<u64>() {
24
Self::TypeFitsInto64Bits
25
} else {
- Self::TypeExeceeds64Bits(core::any::type_name::<T>())
26
27
+ { Self::TypeExeceeds64Bits(core::any::type_name::<T>()) }
28
29
+ { Self::TypeExeceeds64Bits }
30
31
32
0 commit comments