about summary refs log tree commit diff
path: root/src/libstd/sys
AgeCommit message (Collapse)AuthorLines
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
2017-06-29redox: symlink and readlinkIan Douglas Scott-4/+12
2017-06-29Auto merge of #42848 - ids1024:redox-fix, r=sfacklerbors-3/+2
Fix Redox build, broken in ecbb896b9eb2acadefde57be493e4298c1aa04a3
2017-06-24Auto merge of #42687 - alexcrichton:windows-tls, r=sfacklerbors-104/+26
rustc: Enable #[thread_local] for Windows I think LLVM has had support for quite some time now for this, we just never got around to testing it out and binding it. We've had some trouble landing this in the past I believe, but it's time to try again! This commit flags the `#[thread_local]` attribute as being available for Windows targets and adds an implementation of `register_dtor` in the `thread::local` module to ensure we can destroy these keys. The same functionality is implemented in clang via a function called `__tlregdtor` (presumably provided in some Windows runtime somewhere), but this function unfortunately does not take a data pointer (just a thunk) which means we can't easily call it. For now destructors are just run in the same way the Linux fallback is implemented, which is just keeping track via a single OS-based TLS key.
2017-06-23rustc: Enable #[thread_local] for WindowsAlex Crichton-104/+26
I think LLVM has had support for quite some time now for this, we just never got around to testing it out and binding it. We've had some trouble landing this in the past I believe, but it's time to try again! This commit flags the `#[thread_local]` attribute as being available for Windows targets and adds an implementation of `register_dtor` in the `thread::local` module to ensure we can destroy these keys. The same functionality is implemented in clang via a function called `__tlregdtor` (presumably provided in some Windows runtime somewhere), but this function unfortunately does not take a data pointer (just a thunk) which means we can't easily call it. For now destructors are just run in the same way the Linux fallback is implemented, which is just keeping track via a single OS-based TLS key.
2017-06-23Rollup merge of #42783 - ids1024:redox-env, r=sfacklerMark Simulacrum-1/+1
Redox: Use create() instead of open() when setting env variable See https://github.com/redox-os/kernel/pull/25.
2017-06-23Removed as many "```ignore" as possible.kennytm-29/+53
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.