Skip to content

Commit ab2a5f5

Browse files
committed
tokio|tokio-stream|tokio-util - ignore failing wasm tests
1 parent 9a1484e commit ab2a5f5

31 files changed

+152
-148
lines changed

tests-build/tests/fail/macros_type_mismatch.stderr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ error[E0277]: the `?` operator can only be used in an async block that returns `
5757
39 | async fn question_mark_operator_with_invalid_option() -> Option<()> {
5858
40 | None?;
5959
| ^ cannot use the `?` operator in an async block that returns `()`
60+
|
61+
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `()`
6062

6163
error[E0308]: mismatched types
6264
--> tests/fail/macros_type_mismatch.rs:40:5
@@ -85,6 +87,8 @@ error[E0277]: the `?` operator can only be used in an async block that returns `
8587
56 | async fn question_mark_operator_with_invalid_result() -> Result<(), ()> {
8688
57 | Ok(())?;
8789
| ^ cannot use the `?` operator in an async block that returns `()`
90+
|
91+
= help: the trait `FromResidual<Result<Infallible, _>>` is not implemented for `()`
8892

8993
error[E0308]: mismatched types
9094
--> tests/fail/macros_type_mismatch.rs:57:5

tokio-stream/src/empty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ unsafe impl<T> Sync for Empty<T> {}
2323
///
2424
/// Basic usage:
2525
///
26-
/// ```
26+
/// ```ignore-wasm
2727
/// use tokio_stream::{self as stream, StreamExt};
2828
///
2929
/// #[tokio::main]

tokio-stream/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//! `Stream`, but this is unfortunately not possible. Instead, you can use a
3232
//! `while let` loop as follows:
3333
//!
34-
//! ```rust
34+
//! ```rust,ignore-wasm
3535
//! use tokio_stream::{self as stream, StreamExt};
3636
//!
3737
//! #[tokio::main]

tokio-stream/src/once.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl<I> Unpin for Once<I> {}
1919
///
2020
/// # Examples
2121
///
22-
/// ```
22+
/// ```ignore-wasm
2323
/// use tokio_stream::{self as stream, StreamExt};
2424
///
2525
/// #[tokio::main]

tokio-stream/src/stream_close.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pin_project! {
1414
///
1515
/// Using `StreamNotifyClose` to handle closed streams with `StreamMap`.
1616
///
17-
/// ```
17+
/// ```ignore-wasm
1818
/// use tokio_stream::{StreamExt, StreamMap, StreamNotifyClose};
1919
///
2020
/// #[tokio::main]

tokio-stream/src/stream_ext.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub trait StreamExt: Stream {
128128
///
129129
/// # Examples
130130
///
131-
/// ```
131+
/// ```ignore-wasm
132132
/// # #[tokio::main]
133133
/// # async fn main() {
134134
/// use tokio_stream::{self as stream, StreamExt};
@@ -170,7 +170,7 @@ pub trait StreamExt: Stream {
170170
///
171171
/// # Examples
172172
///
173-
/// ```
173+
/// ```ignore-wasm
174174
/// # #[tokio::main]
175175
/// # async fn main() {
176176
/// use tokio_stream::{self as stream, StreamExt};
@@ -202,7 +202,7 @@ pub trait StreamExt: Stream {
202202
///
203203
/// # Examples
204204
///
205-
/// ```
205+
/// ```ignore-wasm
206206
/// # #[tokio::main]
207207
/// # async fn main() {
208208
/// use tokio_stream::{self as stream, StreamExt};
@@ -238,7 +238,7 @@ pub trait StreamExt: Stream {
238238
///
239239
/// # Examples
240240
///
241-
/// ```
241+
/// ```ignore-wasm
242242
/// # #[tokio::main]
243243
/// # async fn main() {
244244
/// use tokio_stream::{self as stream, StreamExt};
@@ -282,7 +282,7 @@ pub trait StreamExt: Stream {
282282
///
283283
/// # Examples
284284
///
285-
/// ```
285+
/// ```ignore-wasm
286286
/// # #[tokio::main]
287287
/// # async fn main() {
288288
/// use tokio_stream::{self as stream, StreamExt};
@@ -417,7 +417,7 @@ pub trait StreamExt: Stream {
417417
///
418418
/// # Examples
419419
///
420-
/// ```
420+
/// ```ignore-wasm
421421
/// # #[tokio::main]
422422
/// # async fn main() {
423423
/// use tokio_stream::{self as stream, StreamExt};
@@ -453,7 +453,7 @@ pub trait StreamExt: Stream {
453453
/// standard library.
454454
///
455455
/// # Examples
456-
/// ```
456+
/// ```ignore-wasm
457457
/// # #[tokio::main]
458458
/// # async fn main() {
459459
/// use tokio_stream::{self as stream, StreamExt};
@@ -487,7 +487,7 @@ pub trait StreamExt: Stream {
487487
///
488488
/// # Examples
489489
///
490-
/// ```
490+
/// ```ignore-wasm
491491
/// use tokio_stream::{Stream, StreamExt};
492492
///
493493
/// use std::pin::Pin;
@@ -550,7 +550,7 @@ pub trait StreamExt: Stream {
550550
///
551551
/// # Examples
552552
///
553-
/// ```
553+
/// ```ignore-wasm
554554
/// # #[tokio::main]
555555
/// # async fn main() {
556556
/// use tokio_stream::{self as stream, StreamExt};
@@ -579,7 +579,7 @@ pub trait StreamExt: Stream {
579579
///
580580
/// # Examples
581581
///
582-
/// ```
582+
/// ```ignore-wasm
583583
/// # #[tokio::main]
584584
/// # async fn main() {
585585
/// use tokio_stream::{self as stream, StreamExt};
@@ -605,7 +605,7 @@ pub trait StreamExt: Stream {
605605
///
606606
/// # Examples
607607
///
608-
/// ```
608+
/// ```ignore-wasm
609609
/// # #[tokio::main]
610610
/// # async fn main() {
611611
/// use tokio_stream::{self as stream, StreamExt};
@@ -636,7 +636,7 @@ pub trait StreamExt: Stream {
636636
///
637637
/// # Examples
638638
///
639-
/// ```
639+
/// ```ignore-wasm
640640
/// # #[tokio::main]
641641
/// # async fn main() {
642642
/// use tokio_stream::{self as stream, StreamExt};
@@ -679,7 +679,7 @@ pub trait StreamExt: Stream {
679679
///
680680
/// Basic usage:
681681
///
682-
/// ```
682+
/// ```ignore-wasm
683683
/// # #[tokio::main]
684684
/// # async fn main() {
685685
/// use tokio_stream::{self as stream, StreamExt};
@@ -694,7 +694,7 @@ pub trait StreamExt: Stream {
694694
///
695695
/// Stopping at the first `false`:
696696
///
697-
/// ```
697+
/// ```ignore-wasm
698698
/// # #[tokio::main]
699699
/// # async fn main() {
700700
/// use tokio_stream::{self as stream, StreamExt};
@@ -738,7 +738,7 @@ pub trait StreamExt: Stream {
738738
///
739739
/// Basic usage:
740740
///
741-
/// ```
741+
/// ```ignore-wasm
742742
/// # #[tokio::main]
743743
/// # async fn main() {
744744
/// use tokio_stream::{self as stream, StreamExt};
@@ -753,7 +753,7 @@ pub trait StreamExt: Stream {
753753
///
754754
/// Stopping at the first `true`:
755755
///
756-
/// ```
756+
/// ```ignore-wasm
757757
/// # #[tokio::main]
758758
/// # async fn main() {
759759
/// use tokio_stream::{self as stream, StreamExt};
@@ -784,7 +784,7 @@ pub trait StreamExt: Stream {
784784
///
785785
/// # Examples
786786
///
787-
/// ```
787+
/// ```ignore-wasm
788788
/// use tokio_stream::{self as stream, StreamExt};
789789
///
790790
/// #[tokio::main]
@@ -822,7 +822,7 @@ pub trait StreamExt: Stream {
822822
///
823823
/// # Examples
824824
/// Basic usage:
825-
/// ```
825+
/// ```ignore-wasm
826826
/// # #[tokio::main]
827827
/// # async fn main() {
828828
/// use tokio_stream::{self as stream, *};
@@ -871,7 +871,7 @@ pub trait StreamExt: Stream {
871871
///
872872
/// Basic usage:
873873
///
874-
/// ```
874+
/// ```ignore-wasm
875875
/// use tokio_stream::{self as stream, StreamExt};
876876
///
877877
/// #[tokio::main]
@@ -888,7 +888,7 @@ pub trait StreamExt: Stream {
888888
///
889889
/// Collecting a stream of `Result` values
890890
///
891-
/// ```
891+
/// ```ignore-wasm
892892
/// use tokio_stream::{self as stream, StreamExt};
893893
///
894894
/// #[tokio::main]
@@ -944,7 +944,7 @@ pub trait StreamExt: Stream {
944944
///
945945
/// Suppose we have a stream `int_stream` that yields 3 numbers (1, 2, 3):
946946
///
947-
/// ```
947+
/// ```ignore-wasm
948948
/// # #[tokio::main]
949949
/// # async fn main() {
950950
/// use tokio_stream::{self as stream, StreamExt};
@@ -1030,7 +1030,7 @@ pub trait StreamExt: Stream {
10301030
///
10311031
/// Suppose we have a stream `int_stream` that yields 3 numbers (1, 2, 3):
10321032
///
1033-
/// ```
1033+
/// ```ignore-wasm
10341034
/// # #[tokio::main]
10351035
/// # async fn main() {
10361036
/// use tokio_stream::{self as stream, StreamExt};

tokio-stream/src/stream_map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ use std::task::{ready, Context, Poll};
6060
///
6161
/// Merging two streams, then remove them after receiving the first value
6262
///
63-
/// ```
63+
/// ```ignore-wasm
6464
/// use tokio_stream::{StreamExt, StreamMap, Stream};
6565
/// use tokio::sync::mpsc;
6666
/// use std::pin::Pin;
@@ -182,7 +182,7 @@ use std::task::{ready, Context, Poll};
182182
///
183183
/// Using `StreamNotifyClose` to handle closed streams with `StreamMap`.
184184
///
185-
/// ```
185+
/// ```ignore-wasm
186186
/// use tokio_stream::{StreamExt, StreamMap, StreamNotifyClose};
187187
///
188188
/// #[tokio::main]

tokio-stream/src/wrappers/tcp_listener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use tokio::net::{TcpListener, TcpStream};
1010
///
1111
/// Accept connections from both IPv4 and IPv6 listeners in the same loop:
1212
///
13-
/// ```no_run
13+
/// ```no_run,ignore-wasm
1414
/// use std::net::{Ipv4Addr, Ipv6Addr};
1515
///
1616
/// use tokio::net::TcpListener;

tokio-stream/src/wrappers/watch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use tokio::sync::watch::error::RecvError;
1616
///
1717
/// # Examples
1818
///
19-
/// ```
19+
/// ```ignore-wasm
2020
/// # #[tokio::main]
2121
/// # async fn main() {
2222
/// use tokio_stream::{StreamExt, wrappers::WatchStream};
@@ -32,7 +32,7 @@ use tokio::sync::watch::error::RecvError;
3232
/// # }
3333
/// ```
3434
///
35-
/// ```
35+
/// ```ignore-wasm
3636
/// # #[tokio::main]
3737
/// # async fn main() {
3838
/// use tokio_stream::{StreamExt, wrappers::WatchStream};
@@ -50,7 +50,7 @@ use tokio::sync::watch::error::RecvError;
5050
///
5151
/// Example with [`WatchStream<T>::from_changes`]:
5252
///
53-
/// ```
53+
/// ```ignore-wasm
5454
/// # #[tokio::main]
5555
/// # async fn main() {
5656
/// use futures::future::FutureExt;

tokio-util/src/codec/length_delimited.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
//! The following will parse a `u16` length field at offset 0, omitting the
7979
//! frame head in the yielded `BytesMut`.
8080
//!
81-
//! ```
81+
//! ```ignore-wasm
8282
//! # use tokio_stream::StreamExt;
8383
//! # use tokio_util::codec::LengthDelimitedCodec;
8484
//! # #[tokio::main]
@@ -114,7 +114,7 @@
114114
//! The following will parse a `u16` length field at offset 0, including the
115115
//! frame head in the yielded `BytesMut`.
116116
//!
117-
//! ```
117+
//! ```ignore-wasm
118118
//! # use tokio_stream::StreamExt;
119119
//! # use tokio_util::codec::LengthDelimitedCodec;
120120
//! # #[tokio::main]
@@ -151,7 +151,7 @@
151151
//! frame head in the yielded `BytesMut`. In this case, the length field
152152
//! **includes** the frame head length.
153153
//!
154-
//! ```
154+
//! ```ignore-wasm
155155
//! # use tokio_stream::StreamExt;
156156
//! # use tokio_util::codec::LengthDelimitedCodec;
157157
//! # #[tokio::main]
@@ -187,7 +187,7 @@
187187
//! The following will parse a 3 byte length field at offset 0 in a 5 byte
188188
//! frame head, including the frame head in the yielded `BytesMut`.
189189
//!
190-
//! ```
190+
//! ```ignore-wasm
191191
//! # use tokio_stream::StreamExt;
192192
//! # use tokio_util::codec::LengthDelimitedCodec;
193193
//! # #[tokio::main]
@@ -234,7 +234,7 @@
234234
//! yielded `BytesMut`, but the trailing 2 bytes of the frame head will be
235235
//! included.
236236
//!
237-
//! ```
237+
//! ```ignore-wasm
238238
//! # use tokio_stream::StreamExt;
239239
//! # use tokio_util::codec::LengthDelimitedCodec;
240240
//! # #[tokio::main]
@@ -283,7 +283,7 @@
283283
//! included. In this case, the length field **includes** the frame head
284284
//! length.
285285
//!
286-
//! ```
286+
//! ```ignore-wasm
287287
//! # use tokio_stream::StreamExt;
288288
//! # use tokio_util::codec::LengthDelimitedCodec;
289289
//! # #[tokio::main]
@@ -326,7 +326,7 @@
326326
//! The following will parse a 3 byte length field at offset 0 in a 4 byte
327327
//! frame head, excluding the 4th byte from the yielded `BytesMut`.
328328
//!
329-
//! ```
329+
//! ```ignore-wasm
330330
//! # use tokio_stream::StreamExt;
331331
//! # use tokio_util::codec::LengthDelimitedCodec;
332332
//! # #[tokio::main]

0 commit comments

Comments
 (0)