| Age | Commit message (Collapse) | Author | Lines |
|
The text does not need the hyphen, but the anchor name does.
|
|
With the space, the tidy check does not recognize it as
a link label. See also the comment above in line_is_url()
in src/tools/tidy/src/style.rs.
|
|
Currently the link on doc.rust-lang.org is semi-broken; it links to a
page that links to the exact page in the first edition in the book, or
to the index of the second edition of the book. If the second editions
is the recommended one now, we should point the links at that one. It
seems that in the mean time, the links have been updated to point
directly to the first edition of the book, but that hasn't made it onto
the stable channel yet. By the time this commit makes it onto the stable
channel, the second edition of the book should be complete enough. At
least the part about deref coercions is.
|
|
Fix TcpStream::connect_timeout tracking issue number
Before: https://github.com/rust-lang/rust/pull/43709
After: https://github.com/rust-lang/rust/issues/43079
r? @sfackler
|
|
Handle DNS label compression in more places in Redox name resolution
|
|
Improve doc examples for `include*` macros.
|
|
Fix some typos
Follow up of #43794
If refined my script a little bit and found some more.
|
|
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).
|
|
|
|
|
|
Check #[thread_local] statics correctly in the compiler.
Fixes #43733 by introducing `#[allow_internal_unsafe]` analogous to `#[allow_internal_unstable]`, for letting a macro expand to `unsafe` blocks and functions even in `#![forbid(unsafe_code)]` crates.
Fixes #17954 by not letting references to `#[thread_local]` statics escape the function they're taken in - we can't just use a magical lifetime because Rust has *lifetime parametrism*, so if we added the often-proposed `'thread` lifetime, we'd have no way to check it in generic code.
To avoid potential edge cases in the compiler, the lifetime is actually that of a temporary at the same position, i.e. `&TLS_STATIC` has the same lifetime `&non_const_fn()` would.
Referring to `#[thread_local]` `static`s at compile-time is banned now (as per PR discussion).
Additionally, to remove `unsafe impl Sync` from `std::thread::local::fast::Key`, `#[thread_local]` statics are now not required to implement `Sync`, as they are not shared between threads.
|
|
|
|
Fix some typos
I wrote a really naive script and found those typos in the documentation.
|
|
|
|
|
|
|
|
|
|
|
|
File docs
r? @rust-lang/docs
|
|
Fix typo corersponding -> corresponding
I was reading the documentation of __Struct std::os::unix::net::UnixListener__ when I saw a typo inside.
|
|
Stop using URL shortener in docs
tidy will no longer complain about long lines containing links so there
is no reason to use a URL shortener here.
|
|
Make a disable-jemalloc build work
Fixes #43510. I've tested this up to building a stage1 compiler.
r? @alexcrichton
cc @cuviper @vorner
@cuviper your fix was almost correct, you just had a stray `!` in there which caused the second error you saw.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
Avoid calling the column!() macro in panic
Closes #43057
This "fix" adds a new macro called `__rust_unstable_column` and to use it instead of the `column` macro inside panic. The new macro can be shadowed as well as `column` can, but its very likely that there is no code that does this in practice.
There is no real way to make "unstable" macros that are usable by stable macros, so we do the next best thing and prefix the macro with `__rust_unstable` to make sure people recognize it is unstable.
r? @alexcrichton
|
|
|
|
Use explicit wrapping_add …
… to prevent potential unexpected behavior on debug builds.
|
|
|
|
We don't want to guarantee that `Instant::now() != Instant::now()` is
always true since that depends on the speed of the processor and the
resolution of the clock.
|
|
builds
|
|
|
|
Fixes #43510
|
|
Fixes #43649
|
|
tidy will no longer complain about long lines containing links so there
is no reason to use a URL shortener here.
|
|
|
|
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.
|
|
|
|
Thread docs fix and improvements.
None
|