about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorStein Somers <git@steinsomers.be>2019-02-18 00:31:41 +0100
committerStein Somers <git@steinsomers.be>2019-02-18 00:31:41 +0100
commit01bebdf19321a1597f35c2fc2130f1627e944bcf (patch)
tree2c71bc6a77545eacabdc67b1fcaa5f52dd22878c /src/libstd/sys/windows
parent0b9ad6e6fd017837647eed8e5ae824d1f6e278b2 (diff)
parent9a3392e174a432a5f06c1157befc1ce0fae74bec (diff)
downloadrust-01bebdf19321a1597f35c2fc2130f1627e944bcf.tar.gz
rust-01bebdf19321a1597f35c2fc2130f1627e944bcf.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/ext/ffi.rs16
-rw-r--r--src/libstd/sys/windows/ext/fs.rs4
-rw-r--r--src/libstd/sys/windows/ext/io.rs6
-rw-r--r--src/libstd/sys/windows/os.rs2
-rw-r--r--src/libstd/sys/windows/pipe.rs2
-rw-r--r--src/libstd/sys/windows/stdio.rs4
6 files changed, 18 insertions, 16 deletions
diff --git a/src/libstd/sys/windows/ext/ffi.rs b/src/libstd/sys/windows/ext/ffi.rs
index eb278919307..6508c0cf447 100644
--- a/src/libstd/sys/windows/ext/ffi.rs
+++ b/src/libstd/sys/windows/ext/ffi.rs
@@ -3,19 +3,19 @@
 //! # Overview
 //!
 //! For historical reasons, the Windows API uses a form of potentially
-//! ill-formed UTF-16 encoding for strings.  Specifically, the 16-bit
+//! ill-formed UTF-16 encoding for strings. Specifically, the 16-bit
 //! code units in Windows strings may contain [isolated surrogate code
-//! points which are not paired together][ill-formed-utf-16].  The
+//! points which are not paired together][ill-formed-utf-16]. The
 //! Unicode standard requires that surrogate code points (those in the
 //! range U+D800 to U+DFFF) always be *paired*, because in the UTF-16
 //! encoding a *surrogate code unit pair* is used to encode a single
-//! character.  For compatibility with code that does not enforce
+//! character. For compatibility with code that does not enforce
 //! these pairings, Windows does not enforce them, either.
 //!
 //! While it is not always possible to convert such a string losslessly into
 //! a valid UTF-16 string (or even UTF-8), it is often desirable to be
 //! able to round-trip such a string from and to Windows APIs
-//! losslessly.  For example, some Rust code may be "bridging" some
+//! losslessly. For example, some Rust code may be "bridging" some
 //! Windows APIs together, just passing `WCHAR` strings among those
 //! APIs without ever really looking into the strings.
 //!
@@ -28,16 +28,16 @@
 //! # `OsStringExt` and `OsStrExt`
 //!
 //! [`OsString`] is the Rust wrapper for owned strings in the
-//! preferred representation of the operating system.  On Windows,
+//! preferred representation of the operating system. On Windows,
 //! this struct gets augmented with an implementation of the
-//! [`OsStringExt`] trait, which has a [`from_wide`] method.  This
+//! [`OsStringExt`] trait, which has a [`from_wide`] method. This
 //! lets you create an [`OsString`] from a `&[u16]` slice; presumably
 //! you get such a slice out of a `WCHAR` Windows API.
 //!
 //! Similarly, [`OsStr`] is the Rust wrapper for borrowed strings from
-//! preferred representation of the operating system.  On Windows, the
+//! preferred representation of the operating system. On Windows, the
 //! [`OsStrExt`] trait provides the [`encode_wide`] method, which
-//! outputs an [`EncodeWide`] iterator.  You can [`collect`] this
+//! outputs an [`EncodeWide`] iterator. You can [`collect`] this
 //! iterator, for example, to obtain a `Vec<u16>`; you can later get a
 //! pointer to this vector's contents and feed it to Windows APIs.
 //!
diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs
index 6342af46daf..89038da6295 100644
--- a/src/libstd/sys/windows/ext/fs.rs
+++ b/src/libstd/sys/windows/ext/fs.rs
@@ -441,10 +441,10 @@ impl MetadataExt for Metadata {
 /// [`FileType`]: ../../../../std/fs/struct.FileType.html
 #[unstable(feature = "windows_file_type_ext", issue = "0")]
 pub trait FileTypeExt {
-    /// Returns whether this file type is a symbolic link that is also a directory.
+    /// Returns `true` if this file type is a symbolic link that is also a directory.
     #[unstable(feature = "windows_file_type_ext", issue = "0")]
     fn is_symlink_dir(&self) -> bool;
-    /// Returns whether this file type is a symbolic link that is also a file.
+    /// Returns `true` if this file type is a symbolic link that is also a file.
     #[unstable(feature = "windows_file_type_ext", issue = "0")]
     fn is_symlink_file(&self) -> bool;
 }
diff --git a/src/libstd/sys/windows/ext/io.rs b/src/libstd/sys/windows/ext/io.rs
index 76143dee464..fbe0426ce5a 100644
--- a/src/libstd/sys/windows/ext/io.rs
+++ b/src/libstd/sys/windows/ext/io.rs
@@ -16,7 +16,7 @@ pub type RawHandle = raw::HANDLE;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub type RawSocket = raw::SOCKET;
 
-/// Extract raw handles.
+/// Extracts raw handles.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait AsRawHandle {
     /// Extracts the raw handle, without taking any ownership.
@@ -98,7 +98,7 @@ impl IntoRawHandle for fs::File {
     }
 }
 
-/// Extract raw sockets.
+/// Extracts raw sockets.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait AsRawSocket {
     /// Extracts the underlying raw socket from this object.
@@ -106,7 +106,7 @@ pub trait AsRawSocket {
     fn as_raw_socket(&self) -> RawSocket;
 }
 
-/// Create I/O objects from raw sockets.
+/// Creates I/O objects from raw sockets.
 #[stable(feature = "from_raw_os", since = "1.1.0")]
 pub trait FromRawSocket {
     /// Creates a new I/O object from the given raw socket.
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index 5f478827b43..7399dd41a41 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -1,4 +1,4 @@
-//! Implementation of `std::os` functionality for Windows
+//! Implementation of `std::os` functionality for Windows.
 
 #![allow(nonstandard_style)]
 
diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs
index 0d9195a5c97..d3b102268f6 100644
--- a/src/libstd/sys/windows/pipe.rs
+++ b/src/libstd/sys/windows/pipe.rs
@@ -282,7 +282,7 @@ impl<'a> AsyncPipe<'a> {
     /// Takes a parameter `wait` which indicates if this pipe is currently being
     /// read whether the function should block waiting for the read to complete.
     ///
-    /// Return values:
+    /// Returns values:
     ///
     /// * `true` - finished any pending read and the pipe is not at EOF (keep
     ///            going)
diff --git a/src/libstd/sys/windows/stdio.rs b/src/libstd/sys/windows/stdio.rs
index a4f4bd22cd9..0ea19a85525 100644
--- a/src/libstd/sys/windows/stdio.rs
+++ b/src/libstd/sys/windows/stdio.rs
@@ -188,7 +188,9 @@ impl Output {
 }
 
 fn invalid_encoding() -> io::Error {
-    io::Error::new(io::ErrorKind::InvalidData, "text was not valid unicode")
+    io::Error::new(io::ErrorKind::InvalidData,
+                   "Windows stdio in console mode does not support non-UTF-8 byte sequences; \
+                    see https://github.com/rust-lang/rust/issues/23344")
 }
 
 fn readconsole_input_control(wakeup_mask: c::ULONG) -> c::CONSOLE_READCONSOLE_CONTROL {