| Age | Commit message (Collapse) | Author | Lines |
|
Call into fastfail on abort in libpanic_abort on Windows x86(_64)
This partially resolves #73215 though this is only for x86 targets. This code is directly lifted from [libstd](https://github.com/rust-lang/rust/blob/13290e83a6e20f3b408d177a9d64d8cf98fe4615/library/std/src/sys/windows/mod.rs#L315). `__fastfail` is the preferred way to abort a process on Windows as it will hook into debugger toolchains.
Other platforms expose a `_rust_abort` symbol which wraps `std::sys::abort_internal`. This would also work on Windows, but is a slightly largely change as we'd need to make sure that the symbol is properly exposed to the linker. I'm inlining the call to the `__fastfail`, but the indirection through `rust_abort` might be a cleaner approach.
A different instruction must be used on ARM architectures. I'd like to verify this works first before tackling ARM.
|
|
Minor changes to Ipv4Addr
Minor changes to Ipv4Addr
* Impl IntoInner rather than AsInner for Ipv4Addr
* Add some comments
* Add test to show endiannes of Ipv4Addr display
|
|
Report an ambiguity if both modules and primitives are in scope for intra-doc links
Closes https://github.com/rust-lang/rust/issues/75381
- Add a new `prim@` disambiguator, since both modules and primitives are in the same namespace
- Refactor `report_ambiguity` into a closure
Additionally, I noticed that rustdoc would previously allow `[struct@char]` if `char` resolved to a primitive (not if it had a DefId). I fixed that and added a test case.
I also need to update libstd to use `prim@char` instead of `type@char`. If possible I would also like to refactor `ambiguity_error` to use `Disambiguator` instead of its own hand-rolled match - that ran into issues with `prim@` (I updated one and not the other) and it would be better for them to be in sync.
|
|
doc: Fix typo in std::process::Child documentation
Nearly done reading stdlib docs, found another small typo, here's a PR!
r? @steveklabnik
|
|
Switch to intra-doc links in `std::collections`
Part of #75080.
@rustbot modify labels: A-intra-doc-links T-doc T-rustdoc
|
|
doc: Prefer https link for wikipedia URLs
A tiny changes.
|
|
Switch to intra-doc links in `std::macros`
Part of #75080.
---
* Switch to intra-doc links in `std::macros`
* Fix typo in module docs
* Link to `std::io::stderr` instead of `std::io::Stderr` to match the
link text
* Link to `std::io::stdout`
---
@rustbot modify labels: A-intra-doc-links T-doc T-rustdoc
|
|
|
|
|
|
|
|
Document that slice refers to any pointer type to a sequence
I was recently confused about the way slices are represented in memory. The necessary information was not available in the std-docs directly, but was a mix of different material from the reference and book.
This PR should clear up the definition of slices a bit more in the documentation. Especially the fact that the term slice refers to the pointer/reference type, e.g. `&[T]`, and not `[T]`.
It also documents that slice pointers are twice the size of pointers to `Sized` types, as this concept may be unfamiliar to users coming from other languages that do not have the concept of "fat pointers" (especially C/C++).
I've documented why this was important to me and my findings in [this blog post](https://codecrash.me/understanding-rust-slices).
r? @lcnr
|
|
|
|
This reverts part of commit e6c83dd57b920d2069797736ae0a1c9fe14a97cb.
As requested by @steveklabnik .
|
|
|
|
|
|
|
|
Also:
* Fix typo in module docs
* Link to `std::io::stderr` instead of `std::io::Stderr` to match the
link text
* Link to `std::io::stdout`
|
|
Use intra-doc-links in `std::sync::*`
Helps with #75080.
r? @jyn514
|
|
|
|
Raw standard streams are always available. Remove unused wrapper type
that was supposed to be responsible for handling their absence.
|
|
|
|
Raw standard streams constructors are infallible. Remove unnecessary
result type.
|
|
Move to intra doc links for std::thread documentation
Helps with #75080.
@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
r? @jyn514
|
|
clarify documentation of remove_dir errors
remove_dir will error if the path doesn't exist or isn't a directory.
It's useful to clarify that this is "remove dir or fail" not "remove dir
if it exists".
I don't think this belongs in the title. "Removes an existing, empty
directory" is strangely worded-- there's no such thing as a non-existing
directory. Better to just say explicitly it will return an error.
|
|
|
|
Enable stack-overflow detection on musl for non-main threads
|
|
Remove `#[cfg(miri)]` from OnceCell tests
They were carried over from once_cell crate, but they are not entirely
correct (as miri now supports more things), and we don't run miri
tests for std, so let's just remove them.
Maybe one day we'll run miri in std, but then we can just re-install
these attributes.
|
|
Move to intra doc links for std::io
Helps with #75080.
@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
r? @jyn514
I had no problems with those files so I added some small links here and there.
|
|
Make OnceCell<T> transparent to dropck
See the failed build in
https://github.com/rust-lang/rust/pull/75555#issuecomment-675016718
for an example where we need this in real life
r? @ghost
|
|
|
|
They were carried over from once_cell crate, but they are not entirely
correct (as miri now supports more things), and we don't run miri
tests for std, so let's just remove them.
Maybe one day we'll run miri in std, but then we can just re-install
these attributes.
|
|
Switch to intra-doc links in /src/sys/unix/ext/*.rs
Partial fix for #75080
@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
r? @jyn514
These two links are not resolving to either `crate::fs::File...` or `fs::File...`
```
# unix/ext/fs.rs
27: /// [`File::read`]: ../../../../std/fs/struct.File.html#method.read
130: /// [`File::write`]: ../../../../std/fs/struct.File.html#method.write
```
|
|
Move to intra doc links for keyword documentation
Helps with #75080.
@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
|
|
* Impl IntoInner rather than AsInner for Ipv4Addr
* Add some comments
* Add test to show endiannes of Ipv4Addr display
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove fast path in reallocation for same layout sizes
r? @Amanieu
Before merging a perf-run should be done.
Closes https://github.com/rust-lang/wg-allocators/issues/70
|
|
Use intra-doc links in `std::env`, `std::alloc` and `std::error`
This is partial fixes for #75080.
|
|
Move to intra doc links for ascii.rs and panic.rs
Helps with #75080.
@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
I also updated the doc to fix the wording in `AsciiExt` since it is now deprecated.
The two file are small changes so I bundled them together.
Some links could not be changed to make them work, I believe those are known issues with primitive types.
|
|
See the failed build in
https://github.com/rust-lang/rust/pull/75555#issuecomment-675016718
for an example where we need this in real life
|
|
|
|
|
|
|
|
|
|
|