1#[rustfmt::skip]
4macro_rules! define {
5 (
6 signed_type => $s_t:ty,
7 bits => $bits:expr,
8 see_type => $see_t:ty,
9 kind => $kind:ident $(,)?
10 ) => {
11 $crate::shared::casts::define!(
12 unsigned_type => Self,
13 signed_type => $s_t,
14 bits => $bits,
15 kind => $kind,
16 );
17
18 #[doc = $crate::shared::docs::primitive_doc!($see_t, cast_signed)]
25 #[inline(always)]
26 #[must_use = $crate::shared::docs::must_use_copy_doc!()]
27 pub const fn cast_signed(self) -> $s_t {
28 self.as_signed()
29 }
30 };
31}
32
33pub(crate) use define;