File tree 3 files changed +4
-23
lines changed
3 files changed +4
-23
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
18
18
"libc_const_extern_fn_unstable" ,
19
19
"libc_deny_warnings" ,
20
20
"libc_long_array" ,
21
- "libc_ptr_addr_of" ,
22
21
"libc_thread_local" ,
23
22
"libc_underscore_const_names" ,
24
23
"libc_ctest" ,
@@ -87,10 +86,6 @@ fn main() {
87
86
set_cfg ( "libc_long_array" ) ;
88
87
}
89
88
90
- if rustc_minor_ver >= 51 || rustc_dep_of_std {
91
- set_cfg ( "libc_ptr_addr_of" ) ;
92
- }
93
-
94
89
// Rust >= 1.37.0 allows underscores as anonymous constant names.
95
90
if rustc_minor_ver >= 37 || rustc_dep_of_std {
96
91
set_cfg ( "libc_underscore_const_names" ) ;
Original file line number Diff line number Diff line change @@ -311,17 +311,3 @@ macro_rules! deprecated_mach {
311
311
) *
312
312
}
313
313
}
314
-
315
- #[ cfg( not( libc_ptr_addr_of) ) ]
316
- macro_rules! ptr_addr_of {
317
- ( $place: expr) => {
318
- & $place
319
- } ;
320
- }
321
-
322
- #[ cfg( libc_ptr_addr_of) ]
323
- macro_rules! ptr_addr_of {
324
- ( $place: expr) => {
325
- :: core:: ptr:: addr_of!( $place)
326
- } ;
327
- }
Original file line number Diff line number Diff line change @@ -380,16 +380,16 @@ cfg_if! {
380
380
// `addr_of!(EXTERN_STATIC)` is now safe; remove `unsafe` when MSRV >= 1.82
381
381
#[ allow( unused_unsafe) ]
382
382
pub static CLOCK_MONOTONIC : clockid_t =
383
- unsafe { clockid_t( ptr_addr_of !( _CLOCK_MONOTONIC) ) } ;
383
+ clockid_t( core :: ptr :: addr_of !( _CLOCK_MONOTONIC) ) ;
384
384
#[ allow( unused_unsafe) ]
385
385
pub static CLOCK_PROCESS_CPUTIME_ID : clockid_t =
386
- unsafe { clockid_t( ptr_addr_of !( _CLOCK_PROCESS_CPUTIME_ID) ) } ;
386
+ clockid_t( core :: ptr :: addr_of !( _CLOCK_PROCESS_CPUTIME_ID) ) ;
387
387
#[ allow( unused_unsafe) ]
388
388
pub static CLOCK_REALTIME : clockid_t =
389
- unsafe { clockid_t( ptr_addr_of !( _CLOCK_REALTIME) ) } ;
389
+ clockid_t( core :: ptr :: addr_of !( _CLOCK_REALTIME) ) ;
390
390
#[ allow( unused_unsafe) ]
391
391
pub static CLOCK_THREAD_CPUTIME_ID : clockid_t =
392
- unsafe { clockid_t( ptr_addr_of !( _CLOCK_THREAD_CPUTIME_ID) ) } ;
392
+ clockid_t( core :: ptr :: addr_of !( _CLOCK_THREAD_CPUTIME_ID) ) ;
393
393
}
394
394
}
395
395
You can’t perform that action at this time.
0 commit comments