diff options
| author | bors <bors@rust-lang.org> | 2020-03-31 14:00:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-31 14:00:55 +0000 |
| commit | 75ff3110ac6d8a0259023b83fd20d7ab295f8dd6 (patch) | |
| tree | 16273bf92f9580d0c1a3fbb99b10d32c234902b7 /src/libstd | |
| parent | 2113659479a82ea69633b23ef710b58ab127755e (diff) | |
| parent | 976f8d59dddac2ccddbe940953ee6247454e6736 (diff) | |
| download | rust-75ff3110ac6d8a0259023b83fd20d7ab295f8dd6.tar.gz rust-75ff3110ac6d8a0259023b83fd20d7ab295f8dd6.zip | |
Auto merge of #70617 - Centril:rollup-063ycso, r=Centril
Rollup of 9 pull requests
Successful merges:
- #69784 (Optimize strip_prefix and strip_suffix with str patterns)
- #70548 (Add long error code for error E0226)
- #70555 (resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery)
- #70561 (remove obsolete comment)
- #70562 (infer array len from pattern)
- #70585 (std: Fix over-aligned allocations on wasm32-wasi)
- #70587 (Add `Rust` to the code snippet)
- #70588 (Fix incorrect documentation for `str::{split_at, split_at_mut}`)
- #70613 (more clippy fixes)
Failed merges:
r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/stdio.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/process/process_unix.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/wasi/alloc.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 9a82ae7626d..a064c552c84 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -496,7 +496,7 @@ pub fn stdout() -> Stdout { unsafe { let ret = Arc::new(ReentrantMutex::new(RefCell::new(LineWriter::new(stdout)))); ret.init(); - return ret; + ret } } } @@ -664,7 +664,7 @@ pub fn stderr() -> Stderr { *INSTANCE.lock().borrow_mut() = Maybe::Real(stderr); } }); - return Stderr { inner: &INSTANCE }; + Stderr { inner: &INSTANCE } } impl Stderr { diff --git a/src/libstd/sys/unix/process/process_unix.rs b/src/libstd/sys/unix/process/process_unix.rs index 07d0fbf61fe..f389c60615f 100644 --- a/src/libstd/sys/unix/process/process_unix.rs +++ b/src/libstd/sys/unix/process/process_unix.rs @@ -72,7 +72,7 @@ impl Command { } }; - let mut p = Process { pid: pid, status: None }; + let mut p = Process { pid, status: None }; drop(output); let mut bytes = [0; 8]; diff --git a/src/libstd/sys/wasi/alloc.rs b/src/libstd/sys/wasi/alloc.rs index e9760d050e1..bc614162784 100644 --- a/src/libstd/sys/wasi/alloc.rs +++ b/src/libstd/sys/wasi/alloc.rs @@ -10,7 +10,7 @@ unsafe impl GlobalAlloc for System { if layout.align() <= MIN_ALIGN && layout.align() <= layout.size() { libc::malloc(layout.size()) as *mut u8 } else { - libc::aligned_alloc(layout.size(), layout.align()) as *mut u8 + libc::aligned_alloc(layout.align(), layout.size()) as *mut u8 } } |
