@@ -31,15 +31,13 @@ use crate::{event, sys, Interest, Registry, Token};
3131///
3232/// # Examples
3333///
34- // Temporarily disabled on WASI pending https://github.com/WebAssembly/wasi-libc/pull/740:
35- #[ cfg_attr( all( feature = "os-poll" , not( target_os = "wasi" ) ) , doc = "```" ) ]
36- #[ cfg_attr(
37- not( all( feature = "os-poll" , not( target_os = "wasi" ) ) ) ,
38- doc = "```ignore"
39- ) ]
34+ #[ cfg_attr( feature = "os-poll" , doc = "```" ) ]
35+ #[ cfg_attr( not( feature = "os-poll" ) , doc = "```ignore" ) ]
4036/// # use std::error::Error;
4137/// #
4238/// # fn main() -> Result<(), Box<dyn Error>> {
39+ /// # // Temporarily disabled on WASI pending https://github.com/WebAssembly/wasi-libc/pull/740:
40+ /// # if cfg!(target_os = "wasi") { return Ok(()) }
4341/// // An Echo program:
4442/// // SENDER -> sends a message.
4543/// // ECHOER -> listens and prints the message received.
@@ -343,15 +341,13 @@ impl UdpSocket {
343341 ///
344342 /// # Examples
345343 ///
346- // WASI does not yet support broacast
347- #[ cfg_attr( all( feature = "os-poll" , not( target_os = "wasi" ) ) , doc = "```" ) ]
348- #[ cfg_attr(
349- not( all( feature = "os-poll" , not( target_os = "wasi" ) ) ) ,
350- doc = "```ignore"
351- ) ]
344+ #[ cfg_attr( feature = "os-poll" , doc = "```" ) ]
345+ #[ cfg_attr( not( feature = "os-poll" ) , doc = "```ignore" ) ]
352346 /// # use std::error::Error;
353347 /// #
354348 /// # fn main() -> Result<(), Box<dyn Error>> {
349+ /// # // WASI does not yet support broacast
350+ /// # if cfg!(target_os = "wasi") { return Ok(()) }
355351 /// use mio::net::UdpSocket;
356352 ///
357353 /// let broadcast_socket = UdpSocket::bind("127.0.0.1:0".parse()?)?;
@@ -377,15 +373,13 @@ impl UdpSocket {
377373 ///
378374 /// # Examples
379375 ///
380- // WASI does not yet support broacast
381- #[ cfg_attr( all( feature = "os-poll" , not( target_os = "wasi" ) ) , doc = "```" ) ]
382- #[ cfg_attr(
383- not( all( feature = "os-poll" , not( target_os = "wasi" ) ) ) ,
384- doc = "```ignore"
385- ) ]
376+ #[ cfg_attr( feature = "os-poll" , doc = "```" ) ]
377+ #[ cfg_attr( not( feature = "os-poll" ) , doc = "```ignore" ) ]
386378 /// # use std::error::Error;
387379 /// #
388380 /// # fn main() -> Result<(), Box<dyn Error>> {
381+ /// # // WASI does not yet support broacast
382+ /// # if cfg!(target_os = "wasi") { return Ok(()) }
389383 /// use mio::net::UdpSocket;
390384 ///
391385 /// let broadcast_socket = UdpSocket::bind("127.0.0.1:0".parse()?)?;
0 commit comments