Do anonymous lifetimes remapping correctly for nested rpits
Closes#103141
r? `@cjgillot` `@nikomatsakis`
This fixes a stable to stable regression that in my opinion is `P-critical` so, we probably want to backport it all the way up to stable.
This enables I/O in no_std contexts (or, really, any Miri-specific
OS-independent context). Combined with the `abort` intrinsic it should
allow a reasonable test framework in no_std.
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
Implement invocation strategy config
Fixes https://github.com/rust-lang/rust-analyzer/issues/10793
This allows to change how we run build scripts (and `checkOnSave`), exposing two configs:
- `once`: run the specified command once in the project root (the working dir of the server)
- `per_workspace`: run the specified command per workspace in the corresponding workspace
This also applies to `checkOnSave` likewise, though `once_in_root` is useless there currently, due to https://github.com/rust-lang/cargo/issues/11007
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