about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-11-07 17:14:34 +0000
committerbors <bors@rust-lang.org>2018-11-07 17:14:34 +0000
commit25a42b2ceb46887e9941cec667eac99844dd7ad0 (patch)
tree5f2559aa5141631a0652f0df336c5a9e797f0cb6 /src/libstd/sys
parent8315b11b6352cbd91ee096571c31ae7d3ac9613d (diff)
parent4e86576277abda043a24dd763bf0802e33d55259 (diff)
downloadrust-25a42b2ceb46887e9941cec667eac99844dd7ad0.tar.gz
rust-25a42b2ceb46887e9941cec667eac99844dd7ad0.zip
Auto merge of #55746 - kennytm:rollup, r=kennytm
Rollup of 14 pull requests

Successful merges:

 - #55377 (Slight copy-editing for `std::cell::Cell` docs)
 - #55441 (Remove unused re import in gdb_rust_pretty_printing)
 - #55453 (Choose predicates without inference variables over those with them)
 - #55495 (Don't print opt fuel messages to stdout because it breaks Rustbuild)
 - #55501 (Make `process_obligations`' computation of `completed` optional.)
 - #55510 (Fix feature gate only being checked on first repr attr.)
 - #55609 (Run name-anon-globals after LTO passes as well)
 - #55645 (do not print wrapping ranges like normal ranges in validity diagnostics)
 - #55688 (Standardised names and location of ui issue tests)
 - #55692 (-C remark: fix incorrect warning about requiring "--debuginfo" instead of "-C debuginfo=n")
 - #55702 (Add `aarch64-pc-windows-msvc` to deployed targets)
 - #55728 (Update lldb)
 - #55730 (Use trait impl method span when type param mismatch is due to impl Trait)
 - #55734 (refactor: use shorthand fields)
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/cloudabi/time.rs4
-rw-r--r--src/libstd/sys/redox/fd.rs2
-rw-r--r--src/libstd/sys/redox/fs.rs2
-rw-r--r--src/libstd/sys/redox/syscall/error.rs2
-rw-r--r--src/libstd/sys/redox/thread.rs2
-rw-r--r--src/libstd/sys/redox/time.rs2
-rw-r--r--src/libstd/sys/unix/fd.rs2
-rw-r--r--src/libstd/sys/unix/fs.rs8
-rw-r--r--src/libstd/sys/unix/time.rs4
-rw-r--r--src/libstd/sys/windows/process.rs2
-rw-r--r--src/libstd/sys/windows/time.rs2
11 files changed, 16 insertions, 16 deletions
diff --git a/src/libstd/sys/cloudabi/time.rs b/src/libstd/sys/cloudabi/time.rs
index ee12731619a..3d66998b9f5 100644
--- a/src/libstd/sys/cloudabi/time.rs
+++ b/src/libstd/sys/cloudabi/time.rs
@@ -32,7 +32,7 @@ impl Instant {
             let mut t = mem::uninitialized();
             let ret = abi::clock_time_get(abi::clockid::MONOTONIC, 0, &mut t);
             assert_eq!(ret, abi::errno::SUCCESS);
-            Instant { t: t }
+            Instant { t }
         }
     }
 
@@ -71,7 +71,7 @@ impl SystemTime {
             let mut t = mem::uninitialized();
             let ret = abi::clock_time_get(abi::clockid::REALTIME, 0, &mut t);
             assert_eq!(ret, abi::errno::SUCCESS);
-            SystemTime { t: t }
+            SystemTime { t }
         }
     }
 
diff --git a/src/libstd/sys/redox/fd.rs b/src/libstd/sys/redox/fd.rs
index e04e2791b23..d61103a872f 100644
--- a/src/libstd/sys/redox/fd.rs
+++ b/src/libstd/sys/redox/fd.rs
@@ -21,7 +21,7 @@ pub struct FileDesc {
 
 impl FileDesc {
     pub fn new(fd: usize) -> FileDesc {
-        FileDesc { fd: fd }
+        FileDesc { fd }
     }
 
     pub fn raw(&self) -> usize { self.fd }
diff --git a/src/libstd/sys/redox/fs.rs b/src/libstd/sys/redox/fs.rs
index 2e2216186f1..6059406997d 100644
--- a/src/libstd/sys/redox/fs.rs
+++ b/src/libstd/sys/redox/fs.rs
@@ -264,7 +264,7 @@ impl File {
     pub fn file_attr(&self) -> io::Result<FileAttr> {
         let mut stat = syscall::Stat::default();
         cvt(syscall::fstat(self.0.raw(), &mut stat))?;
-        Ok(FileAttr { stat: stat })
+        Ok(FileAttr { stat })
     }
 
     pub fn fsync(&self) -> io::Result<()> {
diff --git a/src/libstd/sys/redox/syscall/error.rs b/src/libstd/sys/redox/syscall/error.rs
index 1ef79547431..1e378370553 100644
--- a/src/libstd/sys/redox/syscall/error.rs
+++ b/src/libstd/sys/redox/syscall/error.rs
@@ -19,7 +19,7 @@ pub type Result<T> = result::Result<T, Error>;
 
 impl Error {
     pub fn new(errno: i32) -> Error {
-        Error { errno: errno }
+        Error { errno }
     }
 
     pub fn mux(result: Result<usize>) -> usize {
diff --git a/src/libstd/sys/redox/thread.rs b/src/libstd/sys/redox/thread.rs
index f4177087d77..bab91b16e6c 100644
--- a/src/libstd/sys/redox/thread.rs
+++ b/src/libstd/sys/redox/thread.rs
@@ -38,7 +38,7 @@ impl Thread {
             panic!("thread failed to exit");
         } else {
             mem::forget(p);
-            Ok(Thread { id: id })
+            Ok(Thread { id })
         }
     }
 
diff --git a/src/libstd/sys/redox/time.rs b/src/libstd/sys/redox/time.rs
index 5c491115c55..aac6d2704e7 100644
--- a/src/libstd/sys/redox/time.rs
+++ b/src/libstd/sys/redox/time.rs
@@ -187,7 +187,7 @@ impl SystemTime {
 
 impl From<syscall::TimeSpec> for SystemTime {
     fn from(t: syscall::TimeSpec) -> SystemTime {
-        SystemTime { t: Timespec { t: t } }
+        SystemTime { t: Timespec { t } }
     }
 }
 
diff --git a/src/libstd/sys/unix/fd.rs b/src/libstd/sys/unix/fd.rs
index db2ea6b660a..af33d2636fb 100644
--- a/src/libstd/sys/unix/fd.rs
+++ b/src/libstd/sys/unix/fd.rs
@@ -41,7 +41,7 @@ fn max_len() -> usize {
 
 impl FileDesc {
     pub fn new(fd: c_int) -> FileDesc {
-        FileDesc { fd: fd }
+        FileDesc { fd }
     }
 
     pub fn raw(&self) -> c_int { self.fd }
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs
index 1d5b0cfa94a..add06aec11b 100644
--- a/src/libstd/sys/unix/fs.rs
+++ b/src/libstd/sys/unix/fs.rs
@@ -317,7 +317,7 @@ impl DirEntry {
         cvt(unsafe {
             fstatat64(fd, self.entry.d_name.as_ptr(), &mut stat, libc::AT_SYMLINK_NOFOLLOW)
         })?;
-        Ok(FileAttr { stat: stat })
+        Ok(FileAttr { stat })
     }
 
     #[cfg(not(any(target_os = "linux", target_os = "emscripten", target_os = "android")))]
@@ -526,7 +526,7 @@ impl File {
         cvt(unsafe {
             fstat64(self.0.raw(), &mut stat)
         })?;
-        Ok(FileAttr { stat: stat })
+        Ok(FileAttr { stat })
     }
 
     pub fn fsync(&self) -> io::Result<()> {
@@ -807,7 +807,7 @@ pub fn stat(p: &Path) -> io::Result<FileAttr> {
     cvt(unsafe {
         stat64(p.as_ptr(), &mut stat)
     })?;
-    Ok(FileAttr { stat: stat })
+    Ok(FileAttr { stat })
 }
 
 pub fn lstat(p: &Path) -> io::Result<FileAttr> {
@@ -816,7 +816,7 @@ pub fn lstat(p: &Path) -> io::Result<FileAttr> {
     cvt(unsafe {
         lstat64(p.as_ptr(), &mut stat)
     })?;
-    Ok(FileAttr { stat: stat })
+    Ok(FileAttr { stat })
 }
 
 pub fn canonicalize(p: &Path) -> io::Result<PathBuf> {
diff --git a/src/libstd/sys/unix/time.rs b/src/libstd/sys/unix/time.rs
index 0b1fb726357..af51f8a8e25 100644
--- a/src/libstd/sys/unix/time.rs
+++ b/src/libstd/sys/unix/time.rs
@@ -217,7 +217,7 @@ mod inner {
 
     impl From<libc::timespec> for SystemTime {
         fn from(t: libc::timespec) -> SystemTime {
-            SystemTime { t: Timespec { t: t } }
+            SystemTime { t: Timespec { t } }
         }
     }
 
@@ -332,7 +332,7 @@ mod inner {
 
     impl From<libc::timespec> for SystemTime {
         fn from(t: libc::timespec) -> SystemTime {
-            SystemTime { t: Timespec { t: t } }
+            SystemTime { t: Timespec { t } }
         }
     }
 
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index 4974a8de89c..ff1ee0d26fe 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -241,7 +241,7 @@ impl<'a> DropGuard<'a> {
     fn new(lock: &'a Mutex) -> DropGuard<'a> {
         unsafe {
             lock.lock();
-            DropGuard { lock: lock }
+            DropGuard { lock }
         }
     }
 }
diff --git a/src/libstd/sys/windows/time.rs b/src/libstd/sys/windows/time.rs
index 07e64d386a1..54bcbc76b1a 100644
--- a/src/libstd/sys/windows/time.rs
+++ b/src/libstd/sys/windows/time.rs
@@ -170,7 +170,7 @@ impl fmt::Debug for SystemTime {
 
 impl From<c::FILETIME> for SystemTime {
     fn from(t: c::FILETIME) -> SystemTime {
-        SystemTime { t: t }
+        SystemTime { t }
     }
 }