@@ -99,13 +99,29 @@ pub use self::unfold::{unfold, Unfold};
99
99
mod zip;
100
100
pub use self :: zip:: Zip ;
101
101
102
+ #[ cfg_attr(
103
+ feature = "cfg-target-has-atomic" ,
104
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
105
+ ) ]
102
106
#[ cfg( feature = "alloc" ) ]
103
107
mod buffer_unordered;
108
+ #[ cfg_attr(
109
+ feature = "cfg-target-has-atomic" ,
110
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
111
+ ) ]
104
112
#[ cfg( feature = "alloc" ) ]
105
113
pub use self :: buffer_unordered:: BufferUnordered ;
106
114
115
+ #[ cfg_attr(
116
+ feature = "cfg-target-has-atomic" ,
117
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
118
+ ) ]
107
119
#[ cfg( feature = "alloc" ) ]
108
120
mod buffered;
121
+ #[ cfg_attr(
122
+ feature = "cfg-target-has-atomic" ,
123
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
124
+ ) ]
109
125
#[ cfg( feature = "alloc" ) ]
110
126
pub use self :: buffered:: Buffered ;
111
127
@@ -119,28 +135,68 @@ mod chunks;
119
135
#[ cfg( feature = "alloc" ) ]
120
136
pub use self :: chunks:: Chunks ;
121
137
138
+ #[ cfg_attr(
139
+ feature = "cfg-target-has-atomic" ,
140
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
141
+ ) ]
122
142
#[ cfg( feature = "alloc" ) ]
123
143
mod for_each_concurrent;
144
+ #[ cfg_attr(
145
+ feature = "cfg-target-has-atomic" ,
146
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
147
+ ) ]
124
148
#[ cfg( feature = "alloc" ) ]
125
149
pub use self :: for_each_concurrent:: ForEachConcurrent ;
126
150
151
+ #[ cfg_attr(
152
+ feature = "cfg-target-has-atomic" ,
153
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
154
+ ) ]
127
155
#[ cfg( feature = "alloc" ) ]
128
156
mod futures_ordered;
157
+ #[ cfg_attr(
158
+ feature = "cfg-target-has-atomic" ,
159
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
160
+ ) ]
129
161
#[ cfg( feature = "alloc" ) ]
130
162
pub use self :: futures_ordered:: { futures_ordered, FuturesOrdered } ;
131
163
164
+ #[ cfg_attr(
165
+ feature = "cfg-target-has-atomic" ,
166
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
167
+ ) ]
132
168
#[ cfg( feature = "alloc" ) ]
133
169
mod futures_unordered;
170
+ #[ cfg_attr(
171
+ feature = "cfg-target-has-atomic" ,
172
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
173
+ ) ]
134
174
#[ cfg( feature = "alloc" ) ]
135
175
pub use self :: futures_unordered:: { futures_unordered, FuturesUnordered } ;
136
176
177
+ #[ cfg_attr(
178
+ feature = "cfg-target-has-atomic" ,
179
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
180
+ ) ]
137
181
#[ cfg( feature = "alloc" ) ]
138
182
mod split;
183
+ #[ cfg_attr(
184
+ feature = "cfg-target-has-atomic" ,
185
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
186
+ ) ]
139
187
#[ cfg( feature = "alloc" ) ]
140
188
pub use self :: split:: { SplitStream , SplitSink , ReuniteError } ;
141
189
190
+ #[ cfg_attr(
191
+ feature = "cfg-target-has-atomic" ,
192
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
193
+ ) ]
142
194
#[ cfg( feature = "alloc" ) ]
143
195
mod select_all;
196
+ #[ cfg_attr(
197
+ feature = "cfg-target-has-atomic" ,
198
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
199
+ ) ]
144
200
#[ cfg( feature = "alloc" ) ]
145
201
pub use self :: select_all:: { select_all, SelectAll } ;
146
202
@@ -613,6 +669,10 @@ pub trait StreamExt: Stream {
613
669
/// await!(fut);
614
670
/// # })
615
671
/// ```
672
+ #[ cfg_attr(
673
+ feature = "cfg-target-has-atomic" ,
674
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
675
+ ) ]
616
676
#[ cfg( feature = "alloc" ) ]
617
677
fn for_each_concurrent < Fut , F > (
618
678
self ,
@@ -809,6 +869,10 @@ pub trait StreamExt: Stream {
809
869
///
810
870
/// This method is only available when the `std` feature of this
811
871
/// library is activated, and it is activated by default.
872
+ #[ cfg_attr(
873
+ feature = "cfg-target-has-atomic" ,
874
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
875
+ ) ]
812
876
#[ cfg( feature = "alloc" ) ]
813
877
fn buffered ( self , n : usize ) -> Buffered < Self >
814
878
where Self :: Item : Future ,
@@ -853,6 +917,10 @@ pub trait StreamExt: Stream {
853
917
/// assert_eq!(await!(buffered.next()), None);
854
918
/// # })
855
919
/// ```
920
+ #[ cfg_attr(
921
+ feature = "cfg-target-has-atomic" ,
922
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
923
+ ) ]
856
924
#[ cfg( feature = "alloc" ) ]
857
925
fn buffer_unordered ( self , n : usize ) -> BufferUnordered < Self >
858
926
where Self :: Item : Future ,
@@ -992,6 +1060,10 @@ pub trait StreamExt: Stream {
992
1060
///
993
1061
/// This method is only available when the `std` feature of this
994
1062
/// library is activated, and it is activated by default.
1063
+ #[ cfg_attr(
1064
+ feature = "cfg-target-has-atomic" ,
1065
+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
1066
+ ) ]
995
1067
#[ cfg( feature = "alloc" ) ]
996
1068
fn split ( self ) -> ( SplitSink < Self > , SplitStream < Self > )
997
1069
where Self : Sink + Sized
0 commit comments