| Age | Commit message (Collapse) | Author | Lines |
|
Fix docs typo in std::os::unix::net::SocketAddr::is_unnamed
|
|
Remove unnecessary `main` functions in doc examples.
|
|
Refactored code to access TLS only in case of panic (II)
Fixes #34787
r? @alexcrichton
Do it **very** carefully this time!
|
|
Rollup of 15 pull requests
- Successful merges: #35371, #35396, #35446, #35449, #35452, #35458, #35465, #35466, #35470, #35475, #35477, #35484, #35504, #35507, #35524
- Failed merges: #35395, #35415
|
|
|
|
|
|
|
|
|
|
|
|
Utilize `PhantomData` to enforce `!Sync` and `!Send` field.
None
|
|
Implement `RefCell::{try_borrow, try_borrow_mut}`
CC #35070
r? @alexcrichton
|
|
|
|
Update HashMap docs regarding DoS protection
Because of changes to how Rust acquires randomness HashMap is not
guaranteed to be DoS resistant. This commit reflects these changes in
the docs themselves and provides an alternative method to creating
a hash that is resistant if needed.
This fixes #33817 and includes relevant information regarding changes made in #33086
|
|
|
|
Add doc example for `std::ffi::NulError::into_vec`.
None
|
|
r=alexcrichton
Fix build on DragonFly (unused function errno_location)
Function errno_location() is not used on DragonFly. As warnings are
errors, this breaks the build.
|
|
|
|
Handle RwLock reader count overflow
`pthread_rwlock_rdlock` may return `EAGAIN` if the maximum reader count overflows. We shouldn't return a successful lock in that case.
|
|
|
|
Function errno_location() is not used on DragonFly. As warnings are
errors, this breaks the build.
|
|
Comment on the casts in the `seek` implementations on files
|
|
|
|
|
|
Because of changes to how Rust acquires randomness HashMap is not
guaranteed to be DoS resistant. This commit reflects these changes in
the docs themselves and provides an alternative method to creating
a hash that is resistant if needed.
|
|
Doc `std::thread::park_timeout`
r? @steveklabnik
|
|
Add doc example for `std::ffi::NulError::nul_position`.
None
|
|
A couple `std::net` doc improvements.
None
|
|
Add io::Error doc examples
Fixes #29359.
r? @steveklabnik
|
|
Add doc examples for FileType struct
Part of #29356.
r? @steveklabnik
|
|
|
|
|
|
|
|
|
|
Escape the unmatched surrogates with lower-case hexadecimal numbers
It's done the same way for the rest of the codepoint escapes.
|
|
|
|
|
|
|
|
|
|
The targets are:
- `arm-unknown-linux-musleabi`
- `arm-unknown-linux-musleabihf`
- `armv7-unknown-linux-musleabihf`
These mirror the existing `gnueabi` targets.
All of these targets produce fully static binaries, similar to the
x86 MUSL targets.
For now these targets can only be used with `--rustbuild` builds, as
https://github.com/rust-lang/compiler-rt/pull/22 only made the
necessary compiler-rt changes in the CMake configs, not the plain
GNU Make configs.
I've tested these targets GCC 5.3.0 compiled again musl-1.1.12
(downloaded from http://musl.codu.org/). An example `./configure`
invocation is:
```
./configure \
--enable-rustbuild
--target=arm-unknown-linux-musleabi \
--musl-root="$MUSL_ROOT"
```
where `MUSL_ROOT` points to the `arm-linux-musleabi` prefix.
Usually that path will be of the form
`/foobar/arm-linux-musleabi/arm-linux-musleabi`.
Usually the cross-compile toolchain will live under
`/foobar/arm-linux-musleabi/bin`. That path should either by added
to your `PATH` variable, or you should add a section to your
`config.toml` as follows:
```
[target.arm-unknown-linux-musleabi]
cc = "/foobar/arm-linux-musleabi/bin/arm-linux-musleabi-gcc"
cxx = "/foobar/arm-linux-musleabi/bin/arm-linux-musleabi-g++"
```
As a prerequisite you'll also have to put a cross-compiled static
`libunwind.a` library in `$MUSL_ROOT/lib`. This is similar to [how
the x86_64 MUSL targets are built]
(https://doc.rust-lang.org/book/advanced-linking.html).
|
|
This is to pull in changes to support ARM MUSL targets.
This change also commits a couple of other cargo-generated changes
to other dependencies in the various Cargo.toml files.
|
|
|
|
|
|
rustbuild: make backtraces (RUST_BACKTRACE) optional
but keep them enabled by default to maintain the status quo.
When disabled shaves ~56KB off every x86_64-unknown-linux-gnu
binary.
To disable backtraces you have to use a config.toml (see
src/bootstrap/config.toml.example for details) when building rustc/std:
$ python bootstrap.py --config=config.toml
---
r? @alexcrichton
cc rust-lang/rfcs#1417
|
|
|
|
|
|
|
|
|
|
Fs docs
Fixes #29356.
r? @steveklabnik
|
|
It's done the same way for the rest of the codepoint escapes.
|
|
Escape fewer Unicode codepoints in `Debug` impl of `str`
Use the same procedure as Python to determine whether a character is
printable, described in [PEP 3138]. In particular, this means that the
following character classes are escaped:
- Cc (Other, Control)
- Cf (Other, Format)
- Cs (Other, Surrogate), even though they can't appear in Rust strings
- Co (Other, Private Use)
- Cn (Other, Not Assigned)
- Zl (Separator, Line)
- Zp (Separator, Paragraph)
- Zs (Separator, Space), except for the ASCII space `' '` `0x20`
This allows for user-friendly inspection of strings that are not
English (e.g. compare `"\u{e9}\u{e8}\u{ea}"` to `"éèê"`).
Fixes #34318.
CC #34422.
[PEP 3138]: https://www.python.org/dev/peps/pep-3138/
|