@@ -99,13 +99,29 @@ pub use self::unfold::{unfold, Unfold};
9999mod zip;
100100pub use self :: zip:: Zip ;
101101
102+ #[ cfg_attr(
103+ feature = "cfg-target-has-atomic" ,
104+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
105+ ) ]
102106#[ cfg( feature = "alloc" ) ]
103107mod buffer_unordered;
108+ #[ cfg_attr(
109+ feature = "cfg-target-has-atomic" ,
110+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
111+ ) ]
104112#[ cfg( feature = "alloc" ) ]
105113pub use self :: buffer_unordered:: BufferUnordered ;
106114
115+ #[ cfg_attr(
116+ feature = "cfg-target-has-atomic" ,
117+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
118+ ) ]
107119#[ cfg( feature = "alloc" ) ]
108120mod buffered;
121+ #[ cfg_attr(
122+ feature = "cfg-target-has-atomic" ,
123+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
124+ ) ]
109125#[ cfg( feature = "alloc" ) ]
110126pub use self :: buffered:: Buffered ;
111127
@@ -119,28 +135,68 @@ mod chunks;
119135#[ cfg( feature = "alloc" ) ]
120136pub use self :: chunks:: Chunks ;
121137
138+ #[ cfg_attr(
139+ feature = "cfg-target-has-atomic" ,
140+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
141+ ) ]
122142#[ cfg( feature = "alloc" ) ]
123143mod for_each_concurrent;
144+ #[ cfg_attr(
145+ feature = "cfg-target-has-atomic" ,
146+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
147+ ) ]
124148#[ cfg( feature = "alloc" ) ]
125149pub use self :: for_each_concurrent:: ForEachConcurrent ;
126150
151+ #[ cfg_attr(
152+ feature = "cfg-target-has-atomic" ,
153+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
154+ ) ]
127155#[ cfg( feature = "alloc" ) ]
128156mod futures_ordered;
157+ #[ cfg_attr(
158+ feature = "cfg-target-has-atomic" ,
159+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
160+ ) ]
129161#[ cfg( feature = "alloc" ) ]
130162pub use self :: futures_ordered:: { futures_ordered, FuturesOrdered } ;
131163
164+ #[ cfg_attr(
165+ feature = "cfg-target-has-atomic" ,
166+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
167+ ) ]
132168#[ cfg( feature = "alloc" ) ]
133169mod futures_unordered;
170+ #[ cfg_attr(
171+ feature = "cfg-target-has-atomic" ,
172+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
173+ ) ]
134174#[ cfg( feature = "alloc" ) ]
135175pub use self :: futures_unordered:: { futures_unordered, FuturesUnordered } ;
136176
177+ #[ cfg_attr(
178+ feature = "cfg-target-has-atomic" ,
179+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
180+ ) ]
137181#[ cfg( feature = "alloc" ) ]
138182mod split;
183+ #[ cfg_attr(
184+ feature = "cfg-target-has-atomic" ,
185+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
186+ ) ]
139187#[ cfg( feature = "alloc" ) ]
140188pub use self :: split:: { SplitStream , SplitSink , ReuniteError } ;
141189
190+ #[ cfg_attr(
191+ feature = "cfg-target-has-atomic" ,
192+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
193+ ) ]
142194#[ cfg( feature = "alloc" ) ]
143195mod select_all;
196+ #[ cfg_attr(
197+ feature = "cfg-target-has-atomic" ,
198+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
199+ ) ]
144200#[ cfg( feature = "alloc" ) ]
145201pub use self :: select_all:: { select_all, SelectAll } ;
146202
@@ -613,6 +669,10 @@ pub trait StreamExt: Stream {
613669 /// await!(fut);
614670 /// # })
615671 /// ```
672+ #[ cfg_attr(
673+ feature = "cfg-target-has-atomic" ,
674+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
675+ ) ]
616676 #[ cfg( feature = "alloc" ) ]
617677 fn for_each_concurrent < Fut , F > (
618678 self ,
@@ -809,6 +869,10 @@ pub trait StreamExt: Stream {
809869 ///
810870 /// This method is only available when the `std` feature of this
811871 /// 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+ ) ]
812876 #[ cfg( feature = "alloc" ) ]
813877 fn buffered ( self , n : usize ) -> Buffered < Self >
814878 where Self :: Item : Future ,
@@ -853,6 +917,10 @@ pub trait StreamExt: Stream {
853917 /// assert_eq!(await!(buffered.next()), None);
854918 /// # })
855919 /// ```
920+ #[ cfg_attr(
921+ feature = "cfg-target-has-atomic" ,
922+ cfg( all( target_has_atomic = "cas" , target_has_atomic = "ptr" ) )
923+ ) ]
856924 #[ cfg( feature = "alloc" ) ]
857925 fn buffer_unordered ( self , n : usize ) -> BufferUnordered < Self >
858926 where Self :: Item : Future ,
@@ -992,6 +1060,10 @@ pub trait StreamExt: Stream {
9921060 ///
9931061 /// This method is only available when the `std` feature of this
9941062 /// 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+ ) ]
9951067 #[ cfg( feature = "alloc" ) ]
9961068 fn split ( self ) -> ( SplitSink < Self > , SplitStream < Self > )
9971069 where Self : Sink + Sized
0 commit comments