Skip to content

Commit 9199bb5

Browse files
authored
Rollup merge of rust-lang#60373 - rasendubi:lang-features-sort-since, r=Centril
Tidy: ensure lang features are sorted by since This is the tidy side of rust-lang#60361. What is left is actually splitting features into groups and sorting by since. This PR also likely to produce a small (a couple of lines) merge conflict with rust-lang#60362. r? @Centril
2 parents 06e1d88 + 201f14b commit 9199bb5

File tree

7 files changed

+256
-82
lines changed

7 files changed

+256
-82
lines changed

Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -3556,6 +3556,7 @@ dependencies = [
35563556
name = "tidy"
35573557
version = "0.1.0"
35583558
dependencies = [
3559+
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
35593560
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
35603561
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
35613562
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",

src/libstd/sys/redox/ext/net.rs

+41-41
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![stable(feature = "unix_socket_redox", since = "1.29")]
1+
#![stable(feature = "unix_socket_redox", since = "1.29.0")]
22

33
//! Unix-specific networking functionality
44
@@ -27,7 +27,7 @@ use crate::sys::{cvt, fd::FileDesc, syscall};
2727
/// let addr = socket.local_addr().expect("Couldn't get local address");
2828
/// ```
2929
#[derive(Clone)]
30-
#[stable(feature = "unix_socket_redox", since = "1.29")]
30+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
3131
pub struct SocketAddr(());
3232

3333
impl SocketAddr {
@@ -55,7 +55,7 @@ impl SocketAddr {
5555
/// let addr = socket.local_addr().expect("Couldn't get local address");
5656
/// assert_eq!(addr.as_pathname(), None);
5757
/// ```
58-
#[stable(feature = "unix_socket_redox", since = "1.29")]
58+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
5959
pub fn as_pathname(&self) -> Option<&Path> {
6060
None
6161
}
@@ -83,12 +83,12 @@ impl SocketAddr {
8383
/// let addr = socket.local_addr().expect("Couldn't get local address");
8484
/// assert_eq!(addr.is_unnamed(), true);
8585
/// ```
86-
#[stable(feature = "unix_socket_redox", since = "1.29")]
86+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
8787
pub fn is_unnamed(&self) -> bool {
8888
false
8989
}
9090
}
91-
#[stable(feature = "unix_socket_redox", since = "1.29")]
91+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
9292
impl fmt::Debug for SocketAddr {
9393
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
9494
write!(fmt, "SocketAddr")
@@ -109,10 +109,10 @@ impl fmt::Debug for SocketAddr {
109109
/// stream.read_to_string(&mut response).unwrap();
110110
/// println!("{}", response);
111111
/// ```
112-
#[stable(feature = "unix_socket_redox", since = "1.29")]
112+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
113113
pub struct UnixStream(FileDesc);
114114

115-
#[stable(feature = "unix_socket_redox", since = "1.29")]
115+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
116116
impl fmt::Debug for UnixStream {
117117
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
118118
let mut builder = fmt.debug_struct("UnixStream");
@@ -143,7 +143,7 @@ impl UnixStream {
143143
/// }
144144
/// };
145145
/// ```
146-
#[stable(feature = "unix_socket_redox", since = "1.29")]
146+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
147147
pub fn connect<P: AsRef<Path>>(path: P) -> io::Result<UnixStream> {
148148
if let Some(s) = path.as_ref().to_str() {
149149
cvt(syscall::open(format!("chan:{}", s), syscall::O_CLOEXEC))
@@ -174,7 +174,7 @@ impl UnixStream {
174174
/// }
175175
/// };
176176
/// ```
177-
#[stable(feature = "unix_socket_redox", since = "1.29")]
177+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
178178
pub fn pair() -> io::Result<(UnixStream, UnixStream)> {
179179
let server = cvt(syscall::open("chan:", syscall::O_CREAT | syscall::O_CLOEXEC))
180180
.map(FileDesc::new)?;
@@ -198,7 +198,7 @@ impl UnixStream {
198198
/// let socket = UnixStream::connect("/tmp/sock").unwrap();
199199
/// let sock_copy = socket.try_clone().expect("Couldn't clone socket");
200200
/// ```
201-
#[stable(feature = "unix_socket_redox", since = "1.29")]
201+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
202202
pub fn try_clone(&self) -> io::Result<UnixStream> {
203203
self.0.duplicate().map(UnixStream)
204204
}
@@ -213,7 +213,7 @@ impl UnixStream {
213213
/// let socket = UnixStream::connect("/tmp/sock").unwrap();
214214
/// let addr = socket.local_addr().expect("Couldn't get local address");
215215
/// ```
216-
#[stable(feature = "unix_socket_redox", since = "1.29")]
216+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
217217
pub fn local_addr(&self) -> io::Result<SocketAddr> {
218218
Err(Error::new(ErrorKind::Other, "UnixStream::local_addr unimplemented on redox"))
219219
}
@@ -228,7 +228,7 @@ impl UnixStream {
228228
/// let socket = UnixStream::connect("/tmp/sock").unwrap();
229229
/// let addr = socket.peer_addr().expect("Couldn't get peer address");
230230
/// ```
231-
#[stable(feature = "unix_socket_redox", since = "1.29")]
231+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
232232
pub fn peer_addr(&self) -> io::Result<SocketAddr> {
233233
Err(Error::new(ErrorKind::Other, "UnixStream::peer_addr unimplemented on redox"))
234234
}
@@ -267,7 +267,7 @@ impl UnixStream {
267267
/// let err = result.unwrap_err();
268268
/// assert_eq!(err.kind(), io::ErrorKind::InvalidInput)
269269
/// ```
270-
#[stable(feature = "unix_socket_redox", since = "1.29")]
270+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
271271
pub fn set_read_timeout(&self, _timeout: Option<Duration>) -> io::Result<()> {
272272
Err(Error::new(ErrorKind::Other, "UnixStream::set_read_timeout unimplemented on redox"))
273273
}
@@ -306,7 +306,7 @@ impl UnixStream {
306306
/// let err = result.unwrap_err();
307307
/// assert_eq!(err.kind(), io::ErrorKind::InvalidInput)
308308
/// ```
309-
#[stable(feature = "unix_socket_redox", since = "1.29")]
309+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
310310
pub fn set_write_timeout(&self, _timeout: Option<Duration>) -> io::Result<()> {
311311
Err(Error::new(ErrorKind::Other, "UnixStream::set_write_timeout unimplemented on redox"))
312312
}
@@ -323,7 +323,7 @@ impl UnixStream {
323323
/// socket.set_read_timeout(Some(Duration::new(1, 0))).expect("Couldn't set read timeout");
324324
/// assert_eq!(socket.read_timeout().unwrap(), Some(Duration::new(1, 0)));
325325
/// ```
326-
#[stable(feature = "unix_socket_redox", since = "1.29")]
326+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
327327
pub fn read_timeout(&self) -> io::Result<Option<Duration>> {
328328
Err(Error::new(ErrorKind::Other, "UnixStream::read_timeout unimplemented on redox"))
329329
}
@@ -340,7 +340,7 @@ impl UnixStream {
340340
/// socket.set_write_timeout(Some(Duration::new(1, 0))).expect("Couldn't set write timeout");
341341
/// assert_eq!(socket.write_timeout().unwrap(), Some(Duration::new(1, 0)));
342342
/// ```
343-
#[stable(feature = "unix_socket_redox", since = "1.29")]
343+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
344344
pub fn write_timeout(&self) -> io::Result<Option<Duration>> {
345345
Err(Error::new(ErrorKind::Other, "UnixStream::write_timeout unimplemented on redox"))
346346
}
@@ -355,7 +355,7 @@ impl UnixStream {
355355
/// let socket = UnixStream::connect("/tmp/sock").unwrap();
356356
/// socket.set_nonblocking(true).expect("Couldn't set nonblocking");
357357
/// ```
358-
#[stable(feature = "unix_socket_redox", since = "1.29")]
358+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
359359
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
360360
self.0.set_nonblocking(nonblocking)
361361
}
@@ -375,7 +375,7 @@ impl UnixStream {
375375
///
376376
/// # Platform specific
377377
/// On Redox this always returns `None`.
378-
#[stable(feature = "unix_socket_redox", since = "1.29")]
378+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
379379
pub fn take_error(&self) -> io::Result<Option<io::Error>> {
380380
Ok(None)
381381
}
@@ -397,13 +397,13 @@ impl UnixStream {
397397
/// let socket = UnixStream::connect("/tmp/sock").unwrap();
398398
/// socket.shutdown(Shutdown::Both).expect("shutdown function failed");
399399
/// ```
400-
#[stable(feature = "unix_socket_redox", since = "1.29")]
400+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
401401
pub fn shutdown(&self, _how: Shutdown) -> io::Result<()> {
402402
Err(Error::new(ErrorKind::Other, "UnixStream::shutdown unimplemented on redox"))
403403
}
404404
}
405405

406-
#[stable(feature = "unix_socket_redox", since = "1.29")]
406+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
407407
impl io::Read for UnixStream {
408408
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
409409
io::Read::read(&mut &*self, buf)
@@ -415,7 +415,7 @@ impl io::Read for UnixStream {
415415
}
416416
}
417417

418-
#[stable(feature = "unix_socket_redox", since = "1.29")]
418+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
419419
impl<'a> io::Read for &'a UnixStream {
420420
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
421421
self.0.read(buf)
@@ -427,7 +427,7 @@ impl<'a> io::Read for &'a UnixStream {
427427
}
428428
}
429429

430-
#[stable(feature = "unix_socket_redox", since = "1.29")]
430+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
431431
impl io::Write for UnixStream {
432432
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
433433
io::Write::write(&mut &*self, buf)
@@ -438,7 +438,7 @@ impl io::Write for UnixStream {
438438
}
439439
}
440440

441-
#[stable(feature = "unix_socket_redox", since = "1.29")]
441+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
442442
impl<'a> io::Write for &'a UnixStream {
443443
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
444444
self.0.write(buf)
@@ -449,21 +449,21 @@ impl<'a> io::Write for &'a UnixStream {
449449
}
450450
}
451451

452-
#[stable(feature = "unix_socket_redox", since = "1.29")]
452+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
453453
impl AsRawFd for UnixStream {
454454
fn as_raw_fd(&self) -> RawFd {
455455
self.0.raw()
456456
}
457457
}
458458

459-
#[stable(feature = "unix_socket_redox", since = "1.29")]
459+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
460460
impl FromRawFd for UnixStream {
461461
unsafe fn from_raw_fd(fd: RawFd) -> UnixStream {
462462
UnixStream(FileDesc::new(fd))
463463
}
464464
}
465465

466-
#[stable(feature = "unix_socket_redox", since = "1.29")]
466+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
467467
impl IntoRawFd for UnixStream {
468468
fn into_raw_fd(self) -> RawFd {
469469
self.0.into_raw()
@@ -498,10 +498,10 @@ impl IntoRawFd for UnixStream {
498498
/// }
499499
/// }
500500
/// ```
501-
#[stable(feature = "unix_socket_redox", since = "1.29")]
501+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
502502
pub struct UnixListener(FileDesc);
503503

504-
#[stable(feature = "unix_socket_redox", since = "1.29")]
504+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
505505
impl fmt::Debug for UnixListener {
506506
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
507507
let mut builder = fmt.debug_struct("UnixListener");
@@ -529,7 +529,7 @@ impl UnixListener {
529529
/// }
530530
/// };
531531
/// ```
532-
#[stable(feature = "unix_socket_redox", since = "1.29")]
532+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
533533
pub fn bind<P: AsRef<Path>>(path: P) -> io::Result<UnixListener> {
534534
if let Some(s) = path.as_ref().to_str() {
535535
cvt(syscall::open(format!("chan:{}", s), syscall::O_CREAT | syscall::O_CLOEXEC))
@@ -563,7 +563,7 @@ impl UnixListener {
563563
/// Err(e) => println!("accept function failed: {:?}", e),
564564
/// }
565565
/// ```
566-
#[stable(feature = "unix_socket_redox", since = "1.29")]
566+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
567567
pub fn accept(&self) -> io::Result<(UnixStream, SocketAddr)> {
568568
self.0.duplicate_path(b"listen").map(|fd| (UnixStream(fd), SocketAddr(())))
569569
}
@@ -583,7 +583,7 @@ impl UnixListener {
583583
///
584584
/// let listener_copy = listener.try_clone().expect("try_clone failed");
585585
/// ```
586-
#[stable(feature = "unix_socket_redox", since = "1.29")]
586+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
587587
pub fn try_clone(&self) -> io::Result<UnixListener> {
588588
self.0.duplicate().map(UnixListener)
589589
}
@@ -599,7 +599,7 @@ impl UnixListener {
599599
///
600600
/// let addr = listener.local_addr().expect("Couldn't get local address");
601601
/// ```
602-
#[stable(feature = "unix_socket_redox", since = "1.29")]
602+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
603603
pub fn local_addr(&self) -> io::Result<SocketAddr> {
604604
Err(Error::new(ErrorKind::Other, "UnixListener::local_addr unimplemented on redox"))
605605
}
@@ -615,7 +615,7 @@ impl UnixListener {
615615
///
616616
/// listener.set_nonblocking(true).expect("Couldn't set non blocking");
617617
/// ```
618-
#[stable(feature = "unix_socket_redox", since = "1.29")]
618+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
619619
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
620620
self.0.set_nonblocking(nonblocking)
621621
}
@@ -636,7 +636,7 @@ impl UnixListener {
636636
///
637637
/// # Platform specific
638638
/// On Redox this always returns `None`.
639-
#[stable(feature = "unix_socket_redox", since = "1.29")]
639+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
640640
pub fn take_error(&self) -> io::Result<Option<io::Error>> {
641641
Ok(None)
642642
}
@@ -672,34 +672,34 @@ impl UnixListener {
672672
/// }
673673
/// }
674674
/// ```
675-
#[stable(feature = "unix_socket_redox", since = "1.29")]
675+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
676676
pub fn incoming<'a>(&'a self) -> Incoming<'a> {
677677
Incoming { listener: self }
678678
}
679679
}
680680

681-
#[stable(feature = "unix_socket_redox", since = "1.29")]
681+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
682682
impl AsRawFd for UnixListener {
683683
fn as_raw_fd(&self) -> RawFd {
684684
self.0.raw()
685685
}
686686
}
687687

688-
#[stable(feature = "unix_socket_redox", since = "1.29")]
688+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
689689
impl FromRawFd for UnixListener {
690690
unsafe fn from_raw_fd(fd: RawFd) -> UnixListener {
691691
UnixListener(FileDesc::new(fd))
692692
}
693693
}
694694

695-
#[stable(feature = "unix_socket_redox", since = "1.29")]
695+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
696696
impl IntoRawFd for UnixListener {
697697
fn into_raw_fd(self) -> RawFd {
698698
self.0.into_raw()
699699
}
700700
}
701701

702-
#[stable(feature = "unix_socket_redox", since = "1.29")]
702+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
703703
impl<'a> IntoIterator for &'a UnixListener {
704704
type Item = io::Result<UnixStream>;
705705
type IntoIter = Incoming<'a>;
@@ -740,12 +740,12 @@ impl<'a> IntoIterator for &'a UnixListener {
740740
/// }
741741
/// ```
742742
#[derive(Debug)]
743-
#[stable(feature = "unix_socket_redox", since = "1.29")]
743+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
744744
pub struct Incoming<'a> {
745745
listener: &'a UnixListener,
746746
}
747747

748-
#[stable(feature = "unix_socket_redox", since = "1.29")]
748+
#[stable(feature = "unix_socket_redox", since = "1.29.0")]
749749
impl<'a> Iterator for Incoming<'a> {
750750
type Item = io::Result<UnixStream>;
751751

0 commit comments

Comments
 (0)