1 | use async_stream::stream; |
---|---|
2 | use futures_util::pin_mut; |
3 | use futures_util::stream::StreamExt; |
4 | |
5 | #[tokio::test] |
6 | async fn spans_preserved() { |
7 | let s = stream! { |
8 | assert_eq!(line!(), 8); |
9 | }; |
10 | pin_mut!(s); |
11 | |
12 | while s.next().await.is_some() { |
13 | unreachable!(); |
14 | } |
15 | } |
16 |