Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page
Closes#101531
I renamed the `did` field in `ItemLink ` to more accurately describe what it does.
r? `@jyn514`
rustdoc: remove unused CSS `#search { position: relative }`
This was added in 611d0e6cce, to allow its child `#results` element to be absolutely positioned inside it. The child stopped being absolute in 8c0469552e.
To keep the layout looking the same, the links need to not have `width: 100%` any more, relying instead on the box naturally growing to fit because it has `display: block`.
Fix ICE report flags display.
#92310 made some changes to the ICE report that displays the rustc flags, but it introduced a bug where a flag like `-Z incremental-verify-ich=yes` was being treated as-if it was `-Cincremental`. This corrupted the output and made it confusing. The cause was using `starts_with` instead of properly splitting the option.
For example, with the command like `rustc foo.rs -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib` would previously look like:
```
note: compiler flags: -C incremental -Z incremental --crate-type lib
```
It now looks like:
```
note: compiler flags: -C incremental=[REDACTED] -Z incremental-verify-ich=yes --crate-type lib
```
I added a `[REDACTED]` marker for `-Cincremental` so it is a little less confusing that a value has been removed.
Fixes#101588
Stabilize raw-dylib for non-x86
This stabilizes the `raw-dylib` and `link_ordinal` features (#58713) for non-x86 architectures (i.e., `x86_64`, `aarch64` and `thumbv7a`):
* Marked the `raw_dylib` feature as `active`.
* Marked the `link_ordinal` attribute as `ungated`.
* Added new errors if either feature is used on x86 targets without the `raw_dylib` feature being enabled.
* Updated tests to only set the `raw_dylib` feature when building for x86.
Rollup of 5 pull requests
Successful merges:
- #101366 (Restore old behaviour on broken UNC paths)
- #101492 (Suggest adding array lengths to references to arrays if possible)
- #101529 (Fix the example code and doctest for Formatter::sign_plus)
- #101573 (update `ParamKindOrd`)
- #101612 (Fix code generation of `Rvalue::Repeat` with 128 bit values)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Rollup of 5 pull requests
Successful merges:
- #101475 (Use futex-based locks and thread parker on Hermit)
- #101492 (Suggest adding array lengths to references to arrays if possible)
- #101495 (Compile spin_loop_hint as pause on x86 even without sse2 enabled)
- #101529 (Fix the example code and doctest for Formatter::sign_plus)
- #101600 (rustdoc: simplify the codeblock tooltip)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
This was added in 611d0e6cce, to allow its
child `#results` element to be absolutely positioned inside it. The
child stopped being absolute in 8c0469552e.
To keep the layout looking the same, the links need to not have
`width: 100%` any more, relying instead on the box naturally growing to
fit because it has `display: block`.
Fix the example code and doctest for Formatter::sign_plus
The provided example to the `sign_plus` method on `fmt` was broken, it displays the `-` sign twice for negative numbers.
This pull request should fix the issue by `.abs()` ing the number so that the negative sign appears only once. It is just one possible solution to the issue, not sure if it's the best. However, this one will behave as expected when combined with fill and alignment operators.
Restore old behaviour on broken UNC paths
This fixes#101358 by restoring the behaviour from previous stable Rust versions. I'm not convinced this is ultimately right but I think it's less wrong and maybe this should be backported to beta?
r? libs
rustdoc: simplify the codeblock tooltip
**https://github.com/rust-lang/rust/pull/101593 needs merged first**
This PR moves the tooltip into example-wrap, simplifying several overly-complex aspects of how these tooltips work:
* The mousover javascript can be removed, because hovering example-wrap can style the tooltip inside.
* The sibling selecor can be removed, because hovering the tooltip also hovers the wrapper, which can hover the codeblock itself.
* The relative positioning of the `<li>` tag, which was added in e861efd9f9 to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.
Fix the example code and doctest for Formatter::sign_plus
The provided example to the `sign_plus` method on `fmt` was broken, it displays the `-` sign twice for negative numbers.
This pull request should fix the issue by `.abs()` ing the number so that the negative sign appears only once. It is just one possible solution to the issue, not sure if it's the best. However, this one will behave as expected when combined with fill and alignment operators.
Compile spin_loop_hint as pause on x86 even without sse2 enabled
The x86 `pause` instruction was introduced with sse2, but because it is encoded as `rep nop`, it works just fine on cpu's without sse2 support. It just doesn't do anything.
Use futex-based locks and thread parker on Hermit
[Hermit now has futex syscalls](https://github.com/hermitcore/libhermit-rs/pull/534), which means Hermit can share the well-tested and performant locks and thread parker used on Linux.
Ping `@mkroening,` `@stlankes`
r? `@m-ou-se`
This commit moves the tooltip into example-wrap, simplifying allowing several
overly-complex things to be fixed:
* The mousover javascript can be removed, because hovering example-wrap can
style the tooltip inside.
* The sibling selecor can be removed, because hovering the tooltip also
hovers the wrapper, which can hover the codeblock itself.
* The relative positioning of the `<li>` tag, which was added in
e861efd9f9 to fix the positioning of the code
tooltip, can now be removed, because example-wrap itself already has
relative positioning.
Update LLVM used in x86 CI dist builds to `15.0.0`
LLVM 15.0.0 has been released, so we can use it in CI builds. We need (at least) LLVM 15 for BOLT, and we regularly update to most recent stable versions. It would also be good to first see the perf. effect of upgrading by itself, to have a better baseline for BOLT.
r? `@Mark-Simulacrum`