@@ -31,47 +31,6 @@ macro_rules! type_alias_no_nz {
3131 }
3232}
3333
34- // To verify that the NonZero types in this file's macro invocations correspond
35- //
36- // perl -n < library/std/src/os/raw/mod.rs -e 'next unless m/type_alias\!/; die "$_ ?" unless m/, (c_\w+) = (\w+), NonZero_(\w+) = NonZero(\w+)/; die "$_ ?" unless $3 eq $1 and $4 eq ucfirst $2'
37- //
38- // NB this does not check that the main c_* types are right.
39-
40- macro_rules! type_alias {
41- {
42- $Docfile: tt, $Alias: ident = $Real: ty, $NZAlias: ident = $NZReal: ty;
43- $( $Cfg: tt ) *
44- } => {
45- type_alias_no_nz! { $Docfile, $Alias = $Real; $( $Cfg ) * }
46-
47- #[ doc = concat!( "Type alias for `NonZero` version of [`" , stringify!( $Alias) , "`]" ) ]
48- #[ unstable( feature = "raw_os_nonzero" , issue = "82363" ) ]
49- $( $Cfg ) *
50- pub type $NZAlias = $NZReal;
51- }
52- }
53-
54- type_alias ! { "c_char.md" , c_char = c_char_definition:: c_char, NonZero_c_char = c_char_definition:: NonZero_c_char ;
55- #[ doc( cfg( all( ) ) ) ] }
56-
57- type_alias ! { "c_schar.md" , c_schar = i8 , NonZero_c_schar = NonZeroI8 ; }
58- type_alias ! { "c_uchar.md" , c_uchar = u8 , NonZero_c_uchar = NonZeroU8 ; }
59- type_alias ! { "c_short.md" , c_short = i16 , NonZero_c_short = NonZeroI16 ; }
60- type_alias ! { "c_ushort.md" , c_ushort = u16 , NonZero_c_ushort = NonZeroU16 ; }
61-
62- type_alias ! { "c_int.md" , c_int = c_int_definition:: c_int, NonZero_c_int = c_int_definition:: NonZero_c_int ;
63- #[ doc( cfg( all( ) ) ) ] }
64- type_alias ! { "c_uint.md" , c_uint = c_int_definition:: c_uint, NonZero_c_uint = c_int_definition:: NonZero_c_uint ;
65- #[ doc( cfg( all( ) ) ) ] }
66-
67- type_alias ! { "c_long.md" , c_long = c_long_definition:: c_long, NonZero_c_long = c_long_definition:: NonZero_c_long ;
68- #[ doc( cfg( all( ) ) ) ] }
69- type_alias ! { "c_ulong.md" , c_ulong = c_long_definition:: c_ulong, NonZero_c_ulong = c_long_definition:: NonZero_c_ulong ;
70- #[ doc( cfg( all( ) ) ) ] }
71-
72- type_alias ! { "c_longlong.md" , c_longlong = i64 , NonZero_c_longlong = NonZeroI64 ; }
73- type_alias ! { "c_ulonglong.md" , c_ulonglong = u64 , NonZero_c_ulonglong = NonZeroU64 ; }
74-
7534type_alias_no_nz ! { "c_float.md" , c_float = f32 ; }
7635type_alias_no_nz ! { "c_double.md" , c_double = f64 ; }
7736
0 commit comments