| Age | Commit message (Collapse) | Author | Lines |
|
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).
|
|
|
|
Fix some typos
I wrote a really naive script and found those typos in the documentation.
|
|
|
|
|
|
Fix typo corersponding -> corresponding
I was reading the documentation of __Struct std::os::unix::net::UnixListener__ when I saw a typo inside.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Fix a number of failing tests on Solaris and SPARC
|
|
|
|
Implement AsRawFd for Stdin, Stdout, and Stderr
https://github.com/rust-lang/rfcs/issues/2074
|
|
|
|
This fixes a handful of long-failing tests.
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
redox: handle multiple paths in PATH
|
|
|
|
fn Path::new<S: AsRef ...>(s: &S) -> &Path
Signed-off-by: NODA, Kai <nodakai@gmail.com>
|
|
Fix backtrace on Redox
This fixes sys::backtrace on Redox
|
|
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.)
|
|
Fix sys::redox::net::tcp
A change to the upper level API needed to be filtered down
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Redox: add stat methods(); support is_symlink()
|
|
|
|
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.
|
|
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.
|
|
The atomic_xchg() loop locks the mutex, so the call to mutex_lock is
incorrect, and blocks.
|
|
This breaks the "single syscall rule", but it's really annoying to hand
write and is pretty foundational.
|
|
|
|
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
|
|
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
|
|
redox: symlink and readlink
|
|
|
|
|