@@ -42,7 +42,7 @@ pub(crate) enum Kind {
42
42
#[ cfg( any( feature = "http1" , feature = "http2" ) ) ]
43
43
Accept ,
44
44
/// Error while reading a body from connection.
45
- #[ cfg( any( feature = "http1" , feature = "http2" ) ) ]
45
+ #[ cfg( any( feature = "http1" , feature = "http2" , feature = "stream" ) ) ]
46
46
Body ,
47
47
/// Error while writing a body to connection.
48
48
#[ cfg( any( feature = "http1" , feature = "http2" ) ) ]
@@ -225,7 +225,7 @@ impl Error {
225
225
Error :: new ( Kind :: UnexpectedMessage )
226
226
}
227
227
228
- #[ cfg( feature = "http1" ) ]
228
+ #[ cfg( any ( feature = "http1" , feature = "http2" ) ) ]
229
229
pub ( crate ) fn new_io ( cause : std:: io:: Error ) -> Error {
230
230
Error :: new ( Kind :: Io ) . with ( cause)
231
231
}
@@ -249,7 +249,7 @@ impl Error {
249
249
Error :: new ( Kind :: ChannelClosed )
250
250
}
251
251
252
- #[ cfg( any( feature = "http1" , feature = "http2" ) ) ]
252
+ #[ cfg( any( feature = "http1" , feature = "http2" , feature = "stream" ) ) ]
253
253
pub ( crate ) fn new_body < E : Into < Cause > > ( cause : E ) -> Error {
254
254
Error :: new ( Kind :: Body ) . with ( cause)
255
255
}
@@ -287,7 +287,7 @@ impl Error {
287
287
Error :: new_user ( User :: UnsupportedStatusCode )
288
288
}
289
289
290
- #[ cfg( feature = "http1" ) ]
290
+ #[ cfg( any ( feature = "http1" , feature = "http2" ) ) ]
291
291
pub ( crate ) fn new_user_absolute_uri_required ( ) -> Error {
292
292
Error :: new_user ( User :: AbsoluteUriRequired )
293
293
}
@@ -350,7 +350,7 @@ impl Error {
350
350
Kind :: Listen => "error creating server listener" ,
351
351
#[ cfg( any( feature = "http1" , feature = "http2" ) ) ]
352
352
Kind :: Accept => "error accepting connection" ,
353
- #[ cfg( any( feature = "http1" , feature = "http2" ) ) ]
353
+ #[ cfg( any( feature = "http1" , feature = "http2" , feature = "stream" ) ) ]
354
354
Kind :: Body => "error reading a body from connection" ,
355
355
#[ cfg( any( feature = "http1" , feature = "http2" ) ) ]
356
356
Kind :: BodyWrite => "error writing a body to connection" ,
0 commit comments