Following up on #92964, only add default trait implementations for the
`c-unwind` family of function pointers. The previous attempt in #92964
added trait implementations for many more ABIs and ran into concerns
regarding the increase in size of the libcore rlib.
An attempt to abstract away function pointer types behind a unified
trait to reduce the duplication of trait impls is being discussed in #99531
but this change looks to be blocked on a lang MCP.
Following @RalfJung's suggestion in
https://github.com/rust-lang/rust/pull/99531#issuecomment-1233440142,
this commit is another cut at #92964 but it _only_ adds the impls for
`extern "C-unwind" fn` and `unsafe extern "C-unwind" fn`.
I am interested in landing this patch to unblock the stabilization of
the `c_unwind` feature.
RFC: https://github.com/rust-lang/rfcs/pull/2945
Tracking Issue: https://github.com/rust-lang/rust/issues/74990
Rollup of 7 pull requests
Successful merges:
- #103211 (rustdoc: remove class name `location` from sidebar sibling nav)
- #103223 (Use already checked RHS ty for LHS deref suggestions)
- #103237 (Clean up codeblock-tooltip rustdoc-gui test)
- #103239 (Allow #[unstable] impls for fn() with unstable abi.)
- #103246 (Mark `rust-analyzer` as a host-only tool)
- #103257 (rustdoc: move `setting-line` color CSS to settings.css)
- #103258 (Make miri read_dir test a little more robust)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
This rule originated as a `font-size: 16px`, when body had `font-size: 13px`
set in 4fd061c426.
It remained even when body's font size was bumped up to 16px,
4d5f4ff5e9, making the rule a no-op, and was
carried forward when it was converted to 1rem in
cc18120425.
Mark `rust-analyzer` as a host-only tool
All tools meant to be shipped with host toolchains only should be marked as `ONLY_HOSTS = true`, but rust-analyzer was marked as `ONLY_HOSTS = false` incorrectly. This meant that bootstrap attempted to build rust-analyzer for cross-compilation-only targets, causing errors because libstd is not present on some of them.
It will still be possible to cross-compile rust-analyzer by passing a different `--host` flag to `./x`, like you can cross-compile other tools.
The problem can be reproduced by running:
```
./x build src/tools/rust-analyzer --target x86_64-unknown-linux-gnu,aarch64-unknown-none
```
Use already checked RHS ty for LHS deref suggestions
There's no reason to do the `check_lhs_assignable` and RHS `check_expr_with_hint` in that order, so invert them and use the typeck results to avoid exponential blowup on error.
Fixes#103219
Fix ICE when trying to GC a Stack with an unknown bottom
Fixes https://github.com/rust-lang/rust/issues/103167
`@RalfJung` I prefer this approach because the whole GC system is sloppy already in order to be efficient (doesn't run often, ignores small stacks) so a bit more imprecision for a simple implementation seems worth it to me. But I'm of course willing to be convinced otherwise.
Update Applicability of `redundant_allocation` lint from `MachineApplicable` to `MaybeIncorrect`
This changes `redundant_allocation` lint from MachineApplicable to MaybeIncorrect
```
changelog: [`redundant_allocation]: Change Applicability from MachineApplicable to MaybeIncorrect
```
fixes#6243
---
changelog: [`redundant_allocation`]: Change Applicability from MachineApplicable to MaybeIncorrect
Use Set instead of Vec in transitive_relation
Helps with #103195. It doesn't fix the underlying quadraticness but it makes it _a lot_ faster to an extent where even doubling the amount of nested references still takes less than two seconds (50s on nightly).
I want to see whether this causes regressions (because the vec was usually quite small) or improvements (as lookup for bigger sets is now much faster) in real code.
use Scalar return types for Windows shims
I started doing this while working on https://github.com/rust-lang/miri/issues/2595; now I don't need the rest of this patch but this part still makes sense.
All tools meant to be shipped with host toolchains only should be marked
as `ONLY_HOSTS = true`, but rust-analyzer was marked as `ONLY_HOSTS =
false` incorrectly. This meant that bootstrap attempted to build
rust-analyzer for cross-compilation-only targets, causing errors because
libstd is not present on some of them.
It will still be possible to cross-compile rust-analyzer by passing a
different --host flag to ./x, like you can cross-compile other tools.