1
- #[ cfg( any(
2
- doc,
3
- target_os = "android" ,
4
- target_os = "dragonfly" ,
5
- target_os = "emscripten" ,
6
- target_os = "freebsd" ,
7
- target_os = "linux" ,
8
- target_os = "netbsd" ,
9
- target_os = "openbsd" ,
10
- ) ) ]
1
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" ) ) ]
11
2
use super :: { recv_vectored_with_ancillary_from, send_vectored_with_ancillary_to, SocketAncillary } ;
12
3
use super :: { sockaddr_un, SocketAddr } ;
13
- #[ cfg( any(
14
- target_os = "android" ,
15
- target_os = "dragonfly" ,
16
- target_os = "emscripten" ,
17
- target_os = "freebsd" ,
18
- target_os = "linux" ,
19
- target_os = "netbsd" ,
20
- target_os = "openbsd" ,
21
- ) ) ]
4
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" ) ) ]
22
5
use crate :: io:: { IoSlice , IoSliceMut } ;
23
6
use crate :: net:: Shutdown ;
24
7
use crate :: os:: unix:: io:: { AsFd , AsRawFd , BorrowedFd , FromRawFd , IntoRawFd , OwnedFd , RawFd } ;
@@ -403,7 +386,8 @@ impl UnixDatagram {
403
386
///
404
387
/// # Examples
405
388
///
406
- /// ```no_run
389
+ #[ cfg_attr( any( target_os = "android" , target_os = "linux" ) , doc = "```no_run" ) ]
390
+ #[ cfg_attr( not( any( target_os = "android" , target_os = "linux" ) ) , doc = "```ignore" ) ]
407
391
/// #![feature(unix_socket_ancillary_data)]
408
392
/// use std::os::unix::net::{UnixDatagram, SocketAncillary, AncillaryData};
409
393
/// use std::io::IoSliceMut;
@@ -433,15 +417,7 @@ impl UnixDatagram {
433
417
/// Ok(())
434
418
/// }
435
419
/// ```
436
- #[ cfg( any(
437
- target_os = "android" ,
438
- target_os = "dragonfly" ,
439
- target_os = "emscripten" ,
440
- target_os = "freebsd" ,
441
- target_os = "linux" ,
442
- target_os = "netbsd" ,
443
- target_os = "openbsd" ,
444
- ) ) ]
420
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" ) ) ]
445
421
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
446
422
pub fn recv_vectored_with_ancillary_from (
447
423
& self ,
@@ -460,7 +436,8 @@ impl UnixDatagram {
460
436
///
461
437
/// # Examples
462
438
///
463
- /// ```no_run
439
+ #[ cfg_attr( any( target_os = "android" , target_os = "linux" ) , doc = "```no_run" ) ]
440
+ #[ cfg_attr( not( any( target_os = "android" , target_os = "linux" ) ) , doc = "```ignore" ) ]
464
441
/// #![feature(unix_socket_ancillary_data)]
465
442
/// use std::os::unix::net::{UnixDatagram, SocketAncillary, AncillaryData};
466
443
/// use std::io::IoSliceMut;
@@ -490,15 +467,7 @@ impl UnixDatagram {
490
467
/// Ok(())
491
468
/// }
492
469
/// ```
493
- #[ cfg( any(
494
- target_os = "android" ,
495
- target_os = "dragonfly" ,
496
- target_os = "emscripten" ,
497
- target_os = "freebsd" ,
498
- target_os = "linux" ,
499
- target_os = "netbsd" ,
500
- target_os = "openbsd" ,
501
- ) ) ]
470
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" ) ) ]
502
471
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
503
472
pub fn recv_vectored_with_ancillary (
504
473
& self ,
@@ -609,7 +578,8 @@ impl UnixDatagram {
609
578
///
610
579
/// # Examples
611
580
///
612
- /// ```no_run
581
+ #[ cfg_attr( any( target_os = "android" , target_os = "linux" ) , doc = "```no_run" ) ]
582
+ #[ cfg_attr( not( any( target_os = "android" , target_os = "linux" ) ) , doc = "```ignore" ) ]
613
583
/// #![feature(unix_socket_ancillary_data)]
614
584
/// use std::os::unix::net::{UnixDatagram, SocketAncillary};
615
585
/// use std::io::IoSlice;
@@ -633,15 +603,7 @@ impl UnixDatagram {
633
603
/// Ok(())
634
604
/// }
635
605
/// ```
636
- #[ cfg( any(
637
- target_os = "android" ,
638
- target_os = "dragonfly" ,
639
- target_os = "emscripten" ,
640
- target_os = "freebsd" ,
641
- target_os = "linux" ,
642
- target_os = "netbsd" ,
643
- target_os = "openbsd" ,
644
- ) ) ]
606
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" ) ) ]
645
607
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
646
608
pub fn send_vectored_with_ancillary_to < P : AsRef < Path > > (
647
609
& self ,
@@ -658,7 +620,8 @@ impl UnixDatagram {
658
620
///
659
621
/// # Examples
660
622
///
661
- /// ```no_run
623
+ #[ cfg_attr( any( target_os = "android" , target_os = "linux" ) , doc = "```no_run" ) ]
624
+ #[ cfg_attr( not( any( target_os = "android" , target_os = "linux" ) ) , doc = "```ignore" ) ]
662
625
/// #![feature(unix_socket_ancillary_data)]
663
626
/// use std::os::unix::net::{UnixDatagram, SocketAncillary};
664
627
/// use std::io::IoSlice;
@@ -682,15 +645,7 @@ impl UnixDatagram {
682
645
/// Ok(())
683
646
/// }
684
647
/// ```
685
- #[ cfg( any(
686
- target_os = "android" ,
687
- target_os = "dragonfly" ,
688
- target_os = "emscripten" ,
689
- target_os = "freebsd" ,
690
- target_os = "linux" ,
691
- target_os = "netbsd" ,
692
- target_os = "openbsd" ,
693
- ) ) ]
648
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" ) ) ]
694
649
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
695
650
pub fn send_vectored_with_ancillary (
696
651
& self ,
0 commit comments