| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Brings in a few fixes for wasm/asmjs
|
|
in particular:
* show how to create an iterator that yields multiple socket addresses
* show more failing scenarios
|
|
This is a part of libbacktrace linkage and thus the compiler cannot detect if it's used or not.
|
|
|
|
std: Handle OS errors when joining threads
Also add to the documentation that the `join` method can panic.
cc #34971
cc #43539
|
|
Also add to the documentation that the `join` method can panic.
cc #34971
cc #43539
|
|
|
|
|
|
|
|
|
|
Fix inconsistent doc headings
This fixes headings reading "Unsafety" and "Example", they should be "Safety" and "Examples" according to RFC 1574.
r? @steveklabnik
|
|
Fixes #41701.
|
|
This fixes headings reading "Unsafety" and "Example", they should be
"Safety" and "Examples" according to RFC 1574.
|
|
r=sfackler
Thread spawning: don't run `min_stack` if the user has specified stack size.
None
|
|
Mention null_mut on the pointer primitive docs.
Also adds a few mentions that both `*const` and `*mut` support functions, when only `*const` was mentioned before.
|
|
Redox: correct is_absolute() and has_root()
This is awkward, but representing schemes properly in `Components` is not easily possible without breaking backwards compatibility, as discussed earlier in https://github.com/rust-lang/rust/pull/37702.
But these methods can be corrected anyway.
|
|
Point "deref coercions" links to new book
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. (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.
r? @steveklabnik
|
|
Support dynamically-linked and/or native musl targets
These changes allow native compilation on musl-based distributions and the use of dynamic libraries on linux-musl targets. This is intended to remove limitations based on past assumptions about musl targets, while maintaining existing behavior by default.
A minor related bugfix is included.
|
|
std: Respect formatting flags for str-like OsStr
Historically many `Display` and `Debug` implementations for `OsStr`-like
abstractions have gone through `String::from_utf8_lossy`, but this was updated
in #42613 to use an internal `Utf8Lossy` abstraction instead. This had the
unfortunate side effect of causing a regression (#43765) in code which relied on
these `fmt` trait implementations respecting the various formatting flags
specified.
This commit opportunistically adds back interpretation of formatting trait flags
in the "common case" where where `OsStr`-like "thing" is all valid utf-8 and can
delegate to the formatting implementation for `str`. This doesn't entirely solve
the regression as non-utf8 paths will format differently than they did before
still (in that they will not respect formatting flags), but this should solve
the regression for all "real world" use cases of paths and such. The door's also
still open for handling these flags in the future!
Closes #43765
|
|
|
|
The libdl/librt/libpthread provided by musl are no-op (empty static
libraries) on all architectures, mips included.
|
|
|
|
Also adds a few mentions that both `*const` and `*mut` support
functions, when only `*const` was mentioned before.
|
|
|
|
|
|
`.raw_os_error()` (called in `spawn()`) returned None, so this produced an incorrect error.
|
|
Minor rewrite of char primitive unicode intro.
Opened primarily to address #36998.
Despite my love for emoji, the heart example is a little confusing because both heart characters start with the same code point and there can be stark rendering differences across browsers. I also spelled out what each of the code points is in the code block, which (hopefully) sheds light why one character is one code point while the other is two.
Very much open to suggestion and improvements. I'm pretty tired when I wrote this so I might wake up and realize that this is making things more confusing 😅
|
|
|
|
Redox paths are problematic. It would make sense to add a `Scheme`
variant to the `std::path::Component` enum; but that would presumably be
a breaking change due to exhaustive matching. Alternately it could use
the existing `Prefix` variant, like Windows, but none of the existing
types of prefix make sense, Redox only has one kind, and adding a new
variant to that enum has the same issue as `Component`.
|
|
Refactoring: move net specific file descriptor methods
Move the implementations of net specific file descriptor methods from
io to net. This makes it easier to exclude net at all if it is not needed
for a target.
|
|
Fix typo in doc
|
|
Fix typos & us spellings
Fixing some typos and non en-US spellings.
(Update of PR https://github.com/rust-lang/rust/pull/42812 )
|
|
Opened primarily to address #36998.
|
|
|
|
Move the implementations of net specific file descriptior implementations
to net. This makes it easier to exclude net at all if not needed for a
target.
|
|
r=QuietMisdreavus
Clarify writable behavior of readonly-named `Permissions` methods.
Opened primarily to fix https://github.com/rust-lang/rust/issues/41984.
|
|
r=Mark-Simulacrum
use field init shorthand EVERYWHERE
Like #43008 (f668999), but [(lacking reasons to be more timid)](https://github.com/rust-lang/rust/pull/43008#issuecomment-312463564) _much more aggressive_.
r? @Mark-Simulacrum
|
|
Fixes https://github.com/rust-lang/rust/issues/41984.
|
|
Like #43008 (f668999), but _much more aggressive_.
|
|
|
|
Make backtraces work on Redox, copying Unix implementation
The `backtrace/` directory here is the same as the Unix one, except for adding an implementation of `get_executable_filename`.
|
|
|
|
|
|
Rewrite/reorganize docs for stack size/thread names for spawned threads.
* Moves docs about stack size and thread naming from `Builder` to the
`std::thread` module
* Adds more links to the new module-level documentation
* Mentions the 2 MiB stack size default, but indicate it's subject to
change
Fixes https://github.com/rust-lang/rust/issues/43805.
|
|
Instant is monotonically nondecreasing
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.
|
|
|
|
Historically many `Display` and `Debug` implementations for `OsStr`-like
abstractions have gone through `String::from_utf8_lossy`, but this was updated
in #42613 to use an internal `Utf8Lossy` abstraction instead. This had the
unfortunate side effect of causing a regression (#43765) in code which relied on
these `fmt` trait implementations respecting the various formatting flags
specified.
This commit opportunistically adds back interpretation of formatting trait flags
in the "common case" where where `OsStr`-like "thing" is all valid utf-8 and can
delegate to the formatting implementation for `str`. This doesn't entirely solve
the regression as non-utf8 paths will format differently than they did before
still (in that they will not respect formatting flags), but this should solve
the regression for all "real world" use cases of paths and such. The door's also
still open for handling these flags in the future!
Closes #43765
|
|
|
|
* Moves docs about stack size and thread naming from `Builder` to the
`std::thread` module
* Adds more links to the new module-level documentation
* Mentions the 2 MiB stack size default, but indicate it's subject to
change
Fixes https://github.com/rust-lang/rust/issues/43805.
|