about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAndy Russell <arussell123@gmail.com>2020-07-07 20:48:15 -0400
committerAndy Russell <arussell123@gmail.com>2020-07-09 10:57:11 -0400
commit133e91da627a42218721caf2083c3f309e1b0dcc (patch)
tree2469eec3ebdbafacac0e4ec20711c45e8795372d /src/libstd
parente1beee4992ad4b235fc700bf7af1ee86f894ea53 (diff)
downloadrust-133e91da627a42218721caf2083c3f309e1b0dcc.tar.gz
rust-133e91da627a42218721caf2083c3f309e1b0dcc.zip
libstd/libcore: fix various typos
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/f32.rs2
-rw-r--r--src/libstd/f64.rs2
-rw-r--r--src/libstd/os/linux/fs.rs2
-rw-r--r--src/libstd/os/redox/fs.rs2
-rw-r--r--src/libstd/sys/sgx/fd.rs2
-rw-r--r--src/libstd/sys/unix/ext/fs.rs4
-rw-r--r--src/libstd/sys/vxworks/fd.rs2
-rw-r--r--src/libstd/sys/wasi/fs.rs8
8 files changed, 12 insertions, 12 deletions
diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs
index b392d6e7226..c905bcf5e3d 100644
--- a/src/libstd/f32.rs
+++ b/src/libstd/f32.rs
@@ -1500,7 +1500,7 @@ mod tests {
         assert_approx_eq!(f32::from_bits(0x44a72000), 1337.0);
         assert_approx_eq!(f32::from_bits(0xc1640000), -14.25);
 
-        // Check that NaNs roundtrip their bits regardless of signalingness
+        // Check that NaNs roundtrip their bits regardless of signaling-ness
         // 0xA is 0b1010; 0x5 is 0b0101 -- so these two together clobbers all the mantissa bits
         let masked_nan1 = f32::NAN.to_bits() ^ 0x002A_AAAA;
         let masked_nan2 = f32::NAN.to_bits() ^ 0x0055_5555;
diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs
index 72268d2cc2f..f09fc8d790b 100644
--- a/src/libstd/f64.rs
+++ b/src/libstd/f64.rs
@@ -1523,7 +1523,7 @@ mod tests {
         assert_approx_eq!(f64::from_bits(0x4094e40000000000), 1337.0);
         assert_approx_eq!(f64::from_bits(0xc02c800000000000), -14.25);
 
-        // Check that NaNs roundtrip their bits regardless of signalingness
+        // Check that NaNs roundtrip their bits regardless of signaling-ness
         // 0xA is 0b1010; 0x5 is 0b0101 -- so these two together clobbers all the mantissa bits
         let masked_nan1 = f64::NAN.to_bits() ^ 0x000A_AAAA_AAAA_AAAA;
         let masked_nan2 = f64::NAN.to_bits() ^ 0x0005_5555_5555_5555;
diff --git a/src/libstd/os/linux/fs.rs b/src/libstd/os/linux/fs.rs
index d22b44a0666..657737394ab 100644
--- a/src/libstd/os/linux/fs.rs
+++ b/src/libstd/os/linux/fs.rs
@@ -285,7 +285,7 @@ pub trait MetadataExt {
     /// ```
     #[stable(feature = "metadata_ext2", since = "1.8.0")]
     fn st_ctime_nsec(&self) -> i64;
-    /// Returns the "preferred" blocksize for efficient filesystem I/O.
+    /// Returns the "preferred" block size for efficient filesystem I/O.
     ///
     /// # Examples
     ///
diff --git a/src/libstd/os/redox/fs.rs b/src/libstd/os/redox/fs.rs
index 6c87df534bd..61b5bff3805 100644
--- a/src/libstd/os/redox/fs.rs
+++ b/src/libstd/os/redox/fs.rs
@@ -289,7 +289,7 @@ pub trait MetadataExt {
     /// ```
     #[stable(feature = "metadata_ext2", since = "1.8.0")]
     fn st_ctime_nsec(&self) -> i64;
-    /// Returns the "preferred" blocksize for efficient filesystem I/O.
+    /// Returns the "preferred" block size for efficient filesystem I/O.
     ///
     /// # Examples
     ///
diff --git a/src/libstd/sys/sgx/fd.rs b/src/libstd/sys/sgx/fd.rs
index 90158030c7f..e5dc5b5adaa 100644
--- a/src/libstd/sys/sgx/fd.rs
+++ b/src/libstd/sys/sgx/fd.rs
@@ -19,7 +19,7 @@ impl FileDesc {
         self.fd
     }
 
-    /// Extracts the actual filedescriptor without closing it.
+    /// Extracts the actual file descriptor without closing it.
     pub fn into_raw(self) -> Fd {
         let fd = self.fd;
         mem::forget(self);
diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs
index 2b2bbc6e9d6..f174a59b49a 100644
--- a/src/libstd/sys/unix/ext/fs.rs
+++ b/src/libstd/sys/unix/ext/fs.rs
@@ -624,7 +624,7 @@ pub trait MetadataExt {
     /// ```
     #[stable(feature = "metadata_ext", since = "1.1.0")]
     fn ctime_nsec(&self) -> i64;
-    /// Returns the blocksize for filesystem I/O.
+    /// Returns the block size for filesystem I/O.
     ///
     /// # Examples
     ///
@@ -635,7 +635,7 @@ pub trait MetadataExt {
     ///
     /// fn main() -> io::Result<()> {
     ///     let meta = fs::metadata("some_file")?;
-    ///     let blocksize = meta.blksize();
+    ///     let block_size = meta.blksize();
     ///     Ok(())
     /// }
     /// ```
diff --git a/src/libstd/sys/vxworks/fd.rs b/src/libstd/sys/vxworks/fd.rs
index 7fa86f0db04..7384cbae3a1 100644
--- a/src/libstd/sys/vxworks/fd.rs
+++ b/src/libstd/sys/vxworks/fd.rs
@@ -29,7 +29,7 @@ impl FileDesc {
         self.fd
     }
 
-    /// Extracts the actual filedescriptor without closing it.
+    /// Extracts the actual file descriptor without closing it.
     pub fn into_raw(self) -> c_int {
         let fd = self.fd;
         mem::forget(self);
diff --git a/src/libstd/sys/wasi/fs.rs b/src/libstd/sys/wasi/fs.rs
index 793daea43c2..2eed9e436a9 100644
--- a/src/libstd/sys/wasi/fs.rs
+++ b/src/libstd/sys/wasi/fs.rs
@@ -597,14 +597,14 @@ fn open_at(fd: &WasiFd, path: &Path, opts: &OpenOptions) -> io::Result<File> {
 ///
 /// WASI has no fundamental capability to do this. All syscalls and operations
 /// are relative to already-open file descriptors. The C library, however,
-/// manages a map of preopened file descriptors to their path, and then the C
+/// manages a map of pre-opened file descriptors to their path, and then the C
 /// library provides an API to look at this. In other words, when you want to
 /// open a path `p`, you have to find a previously opened file descriptor in a
 /// global table and then see if `p` is relative to that file descriptor.
 ///
 /// This function, if successful, will return two items:
 ///
-/// * The first is a `ManuallyDrop<WasiFd>`. This represents a preopened file
+/// * The first is a `ManuallyDrop<WasiFd>`. This represents a pre-opened file
 ///   descriptor which we don't have ownership of, but we can use. You shouldn't
 ///   actually drop the `fd`.
 ///
@@ -619,7 +619,7 @@ fn open_at(fd: &WasiFd, path: &Path, opts: &OpenOptions) -> io::Result<File> {
 /// appropriate rights for performing `rights` actions.
 ///
 /// Note that this can fail if `p` doesn't look like it can be opened relative
-/// to any preopened file descriptor.
+/// to any pre-opened file descriptor.
 fn open_parent(p: &Path) -> io::Result<(ManuallyDrop<WasiFd>, PathBuf)> {
     let p = CString::new(p.as_os_str().as_bytes())?;
     unsafe {
@@ -627,7 +627,7 @@ fn open_parent(p: &Path) -> io::Result<(ManuallyDrop<WasiFd>, PathBuf)> {
         let fd = __wasilibc_find_relpath(p.as_ptr(), &mut ret);
         if fd == -1 {
             let msg = format!(
-                "failed to find a preopened file descriptor \
+                "failed to find a pre-opened file descriptor \
                  through which {:?} could be opened",
                 p
             );