about summary refs log tree commit diff
path: root/src/libstd/sys
AgeCommit message (Collapse)AuthorLines
2017-08-13Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichtonbors-16/+69
Expose all OS-specific modules in libstd doc. 1. Uses the special `--cfg dox` configuration passed by rustbuild when running `rustdoc`. Changes the `#[cfg(platform)]` into `#[cfg(any(dox, platform))]` so that platform-specific API are visible to rustdoc. 2. Since platform-specific implementations often won't compile correctly on other platforms, `rustdoc` is changed to apply `everybody_loops` to the functions during documentation and doc-test harness. 3. Since platform-specific code are documented on all platforms now, it could confuse users who found a useful API but is non-portable. Also, their examples will be doc-tested, so must be excluded when not testing on the native platform. An undocumented attribute `#[doc(cfg(...))]` is introduced to serve the above purposed. Fixes #24658 (Does _not_ fully implement #1998).
2017-08-12Fix some typosBastien Orivel-7/+7
2017-08-12Auto merge of #43794 - Eijebong:fix_typos, r=lukaramu,steveklanik,imperiobors-2/+2
Fix some typos I wrote a really naive script and found those typos in the documentation.
2017-08-11Handle DNS label compression in more placesThomas Levy-14/+12
2017-08-12Fix error during cross-platform documentation.kennytm-2/+21
2017-08-11Rollup merge of #43783 - prisme60:prisme60-typo, r=Mark-SimulacrumGuillaume Gomez-1/+1
Fix typo corersponding -> corresponding I was reading the documentation of __Struct std::os::unix::net::UnixListener__ when I saw a typo inside.
2017-08-11Fix some typosBastien Orivel-2/+2
2017-08-10Auto merge of #43582 - ivanbakel:unused_mut_ref, r=arielb1bors-4/+4
Fixed mutable vars being marked used when they weren't #### NB : bootstrapping is slow on my machine, even with `keep-stage` - fixes for occurances in the current codebase are <s>in the pipeline</s> done. This PR is being put up for review of the fix of the issue. Fixes #43526, Fixes #30280, Fixes #25049 ### Issue Whenever the compiler detected a mutable deref being used mutably, it marked an associated value as being used mutably as well. In the case of derefencing local variables which were mutable references, this incorrectly marked the reference itself being used mutably, instead of its contents - with the consequence of making the following code emit no warnings ``` fn do_thing<T>(mut arg : &mut T) { ... // don't touch arg - just deref it to access the T } ``` ### Fix Make dereferences not be counted as a mutable use, but only when they're on borrows on local variables. #### Why not on things other than local variables? * Whenever you capture a variable in a closure, it gets turned into a hidden reference - when you use it in the closure, it gets dereferenced. If the closure uses the variable mutably, that is actually a mutable use of the thing being dereffed to, so it has to be counted. * If you deref a mutable `Box` to access the contents mutably, you are using the `Box` mutably - so it has to be counted.
2017-08-10Fix typo corersponding -> correspondingFoucher-1/+1
2017-08-10Exposed all platform-specific documentation.kennytm-14/+48
2017-08-09Fix errors on WindowsAriel Ben-Yehuda-2/+2
2017-08-03Simplify Redox backtrace/ to not include non-Redox implementationsIan Douglas Scott-207/+3
2017-08-04Auto merge of #43634 - dhduvall:solaris-test-fixes, r=sanxiynbors-6/+1
Fix a number of failing tests on Solaris and SPARC
2017-08-03Make backtraces work on Redox, copying Unix implementationIan Douglas Scott-32/+363
2017-08-04Auto merge of #43459 - ids1024:asrawfd, r=alexcrichtonbors-0/+55
Implement AsRawFd for Stdin, Stdout, and Stderr https://github.com/rust-lang/rfcs/issues/2074
2017-08-03Fix AsRawHandleIan Douglas Scott-3/+3
2017-08-03Fix a dangling symlink bug in `remove_dir_all()` on SolarisDanek Duvall-6/+1
This fixes a handful of long-failing tests.
2017-08-03Implement AsRawHandle for Std* on WindowsIan Douglas Scott-0/+22
2017-08-01Fixed all unnecessary muts in language coreIsaac van Bakel-2/+2
2017-07-29Split FL and FD fcntlsJeremy Soller-10/+12
2017-07-29Redox: Add JoinHandleExt (matching Unix version)Ian Douglas Scott-0/+50
2017-07-25Correct 'stable' attributeIan Douglas Scott-6/+6
2017-07-24Add a disabled builder for aarch64 emulated testsAlex Crichton-0/+1
This commit adds a disabled builder which will run all tests for the standard library for aarch64 in a QEMU instance. Once we get enough capacity to run this on Travis this can be used to boost our platform coverage of AArch64
2017-07-24Implement AsRawFd for Stdin, Stdout, and StderrIan Douglas Scott-0/+33
2017-07-18Rollup merge of #43304 - ids1024:path2, r=aturonMark Simulacrum-21/+28
redox: handle multiple paths in PATH
2017-07-17redox: handle multiple paths in PATHIan Douglas Scott-21/+28
2017-07-18libstd: remove redundant & from &Path::new(...)NODA, Kai-4/+4
fn Path::new<S: AsRef ...>(s: &S) -> &Path Signed-off-by: NODA, Kai <nodakai@gmail.com>
2017-07-14Rollup merge of #43228 - redox-os:backtrace_fix, r=alexcrichtonCorey Farwell-3/+12
Fix backtrace on Redox This fixes sys::backtrace on Redox
2017-07-14Rollup merge of #43222 - RalfJung:symlink, r=sfacklerCorey Farwell-1/+1
windows::fs::symlink_dir: fix example to actually use symlink_dir I don't have a windows machine, so I couldn't test if this doctest still works -- but it looks trivial enough. (I know, famous last words.)
2017-07-14Rollup merge of #43202 - jackpot51:patch-1, r=sfacklerCorey Farwell-1/+1
Fix sys::redox::net::tcp A change to the upper level API needed to be filtered down
2017-07-13Fix backtrace on RedoxJeremy Soller-3/+12
2017-07-13windows::fs::symlink_dir: fix example to actually use symlink_dirRalf Jung-1/+1
2017-07-13Rollup merge of #43204 - jackpot51:patch-3, r=alexcrichtonSteve Klabnik-3/+4
Implement fs::rename in sys::redox This uses a simple implementation of copy + unlink. Redox does not have a rename or link system call for a faster implementation.
2017-07-12Update fs.rsJeremy Soller-1/+1
2017-07-12Update mod.rsJeremy Soller-3/+1
2017-07-12Update fs.rsJeremy Soller-2/+3
2017-07-12Update mod.rsJeremy Soller-17/+1
2017-07-12Update tcp.rsJeremy Soller-1/+1
2017-07-12Rollup merge of #43100 - ids1024:stat2, r=aturonMark Simulacrum-2/+17
Redox: add stat methods(); support is_symlink()
2017-07-11Redox: Use O_NOFOLLOW for lstat()Ian Douglas Scott-1/+5
2017-07-09Auto merge of #43082 - ids1024:condvar2, r=alexcrichtonbors-3/+1
Redox: Fix Condvar.wait(); do not lock mutex twice The atomic_xchg() loop locks the mutex, so the call to mutex_lock is incorrect, and blocks.
2017-07-07Skip the main thread's manual stack guard on LinuxJosh Stone-15/+29
Linux doesn't allocate the whole stack right away, and the kernel has its own stack-guard mechanism to fault when growing too close to an existing mapping. If we map our own guard, then the kernel starts enforcing a rather large gap above that, rendering much of the possible stack space useless. Instead, we'll just note where we expect rlimit to start faulting, so our handler can report "stack overflow", and trust that the kernel's own stack guard will work. Fixes #43052.
2017-07-07Redox: Fix Condvar.wait(); do not lock mutex twiceIan Douglas Scott-3/+1
The atomic_xchg() loop locks the mutex, so the call to mutex_lock is incorrect, and blocks.
2017-07-06Implement TcpStream::connect_timeoutSteven Fackler-2/+152
This breaks the "single syscall rule", but it's really annoying to hand write and is pretty foundational.
2017-07-06Redox: add stat methods(); support is_symlink()Ian Douglas Scott-2/+17
2017-07-06Auto merge of #42727 - alexcrichton:allocators-new, r=eddybbors-38/+0
rustc: Implement the #[global_allocator] attribute This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/1974 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-38/+0
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-04Rollup merge of #42975 - ids1024:symlink2, r=aturonMark Simulacrum-6/+15
redox: symlink and readlink
2017-06-30Fix long lineIan Douglas Scott-1/+2
2017-06-29Fix Redox build, apparently broken by #42687Ian Douglas Scott-1/+5