Rustdoc-Json: Add `Path` type for traits.
Avoids using `Type` for trait fields, as a trait must always be a path, and not any other kind of type.
``@rustbot`` modify labels: +A-rustdoc-json +T-rustdoc
Closes#100106
Rollup of 11 pull requests
Successful merges:
- #100355 (rustdoc: Rename ``@has` FILE PATTERN` to ``@hasraw` FILE PATTERN`)
- #100407 (avoid some int2ptr casts in thread_local_key tests)
- #100434 (Fix HIR pretty printing of let else)
- #100438 (Erase regions better in `promote_candidate`)
- #100445 (adapt test for msan message change)
- #100447 (Remove more Clean trait implementations)
- #100464 (Make `[rust] use-lld=true` work on windows)
- #100475 (Give a helpful diagnostic when the next struct field has an attribute)
- #100490 (wf: correctly `shallow_resolve` consts)
- #100501 (nicer Miri backtraces for from_exposed_addr)
- #100509 (merge two test directories that mean the same thing)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
wf: correctly `shallow_resolve` consts
`shallow_resolve` on `InferConst` is always a noop. this is mostly irrelevant as inference vars should already be resolved at most - if not all - call sites. Haven't actually looked too deeply into whether this was a problem.
Erase regions better in `promote_candidate`
Use `tcx.erase_regions` instead of manually walking through the substs.... this also makes the code slightly simpler 🙈Fixes#100360Fixes#89851
Do not unconditionally succeed RUSTC_WRAPPER checks when run by build scripts
rust-analyzer's RUSTC_WRAPPER unconditionally succeeds `cargo check`
invocations tripping up build scripts using `cargo check` to probe for
successful compilations. To prevent this from happening the RUSTC_WRAPPER
now checks if it's run from a build script by looking for the
`CARGO_CFG_TARGET_ARCH` env var that cargo sets only when running build
scripts.
rust-analyzer's RUSTC_WRAPPER unconditionally succeeds `cargo check`
invocations tripping up build scripts using `cargo check` to probe for
successful compilations. To prevent this from happening the RUSTC_WRAPPER
now checks if it's run from a build script by looking for the
`CARGO_CFG_TARGET_ARCH` env var that cargo sets only when running build
scripts.
`@!has` (and `@!matches`) with two arguments used to treat the second
argument as a literal string of HTML code. Now, that feature has been
renamed into `@!hasraw` (and `@!matchesraw`), and the arity-2 `@!has`
version is an error.
These uses thought the second argument was being treated as an XPath, as
with the arity-3 version, but in fact was being treated as literal HTML.
Because these were checking for the *absence* of the string, the tests
silently did nothing -- an XPath string won't ever be showing up in the
test's generated HTML!
Reasons:
1. It's shorter.
2. `@matches-literal` seems to contradict itself: a regex is
intrinsically not a literal match, while it is still a textual match.
Use llvm-libunwind="in-tree" for Fuchsia targets
With updates to Fuchsia CI's Zircon libraries #99833, we can introduce `llvm-libunwind="in-tree"` for Fuchsia targets. This PR restores functionality removed from https://github.com/rust-lang/rust/pull/93604#issuecomment-1136515651.
cc `@tmandry` `@djkoloski`