Skip to content

Commit 5200215

Browse files
committed
auto merge of #14035 : alexcrichton/rust/experimental, r=huonw
This was intended as part of the I/O timeouts commit, but it was mistakenly forgotten. The type of the timeout argument is not guaranteed to remain constant into the future.
2 parents ab369c4 + f83d4f0 commit 5200215

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/libstd/io/net/tcp.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ impl TcpStream {
169169
///
170170
/// For clarification on the semantics of interrupting a read and a write,
171171
/// take a look at `set_read_timeout` and `set_write_timeout`.
172+
#[experimental = "the timeout argument may change in type and value"]
172173
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
173174
self.obj.set_timeout(timeout_ms)
174175
}
@@ -185,6 +186,7 @@ impl TcpStream {
185186
/// action is taken. Otherwise, the read operation will be scheduled to
186187
/// promptly return. If a timeout error is returned, then no data was read
187188
/// during the timeout period.
189+
#[experimental = "the timeout argument may change in type and value"]
188190
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
189191
self.obj.set_read_timeout(timeout_ms)
190192
}
@@ -211,6 +213,7 @@ impl TcpStream {
211213
/// does not know how many bytes were written as part of the timeout
212214
/// operation. It may be the case that bytes continue to be written in an
213215
/// asynchronous fashion after the call to write returns.
216+
#[experimental = "the timeout argument may change in type and value"]
214217
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
215218
self.obj.set_write_timeout(timeout_ms)
216219
}

src/libstd/io/net/udp.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,23 @@ impl UdpSocket {
147147
/// Sets the read/write timeout for this socket.
148148
///
149149
/// For more information, see `TcpStream::set_timeout`
150+
#[experimental = "the timeout argument may change in type and value"]
150151
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
151152
self.obj.set_timeout(timeout_ms)
152153
}
153154

154155
/// Sets the read timeout for this socket.
155156
///
156157
/// For more information, see `TcpStream::set_timeout`
158+
#[experimental = "the timeout argument may change in type and value"]
157159
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
158160
self.obj.set_read_timeout(timeout_ms)
159161
}
160162

161163
/// Sets the write timeout for this socket.
162164
///
163165
/// For more information, see `TcpStream::set_timeout`
166+
#[experimental = "the timeout argument may change in type and value"]
164167
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
165168
self.obj.set_write_timeout(timeout_ms)
166169
}

src/libstd/io/net/unix.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,23 @@ impl UnixStream {
9797
/// Sets the read/write timeout for this socket.
9898
///
9999
/// For more information, see `TcpStream::set_timeout`
100+
#[experimental = "the timeout argument may change in type and value"]
100101
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
101102
self.obj.set_timeout(timeout_ms)
102103
}
103104

104105
/// Sets the read timeout for this socket.
105106
///
106107
/// For more information, see `TcpStream::set_timeout`
108+
#[experimental = "the timeout argument may change in type and value"]
107109
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
108110
self.obj.set_read_timeout(timeout_ms)
109111
}
110112

111113
/// Sets the write timeout for this socket.
112114
///
113115
/// For more information, see `TcpStream::set_timeout`
116+
#[experimental = "the timeout argument may change in type and value"]
114117
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
115118
self.obj.set_write_timeout(timeout_ms)
116119
}

0 commit comments

Comments
 (0)