Migrate sidebar links color to CSS variables and unify themes with ayu
Part of https://github.com/rust-lang/rust/pull/98460.
This PR does two things:
1. Migrate more theme CSS rules toward CSS variables.
2. Remove `a.current` specific colors depending on the kind of the item behind the link. The `ayu` theme was already doing it this way and I think it makes much more sense like this.
You can test it [here](https://rustdoc.crud.net/imperio/sidebar-links-color/lib2/struct.Foo.html) by hovering other module's items in the sidebar (or check the selector `a.current`).
cc `@jsha`
r? `@notriddle`
Rollup of 7 pull requests
Successful merges:
- #102361 (Fix ICE in const_trait check code)
- #102373 (Flush delayed bugs before codegen)
- #102483 (create def ids for impl traits during ast lowering)
- #102490 (Generate synthetic region from `impl` even in closure body within an associated fn)
- #102492 (Don't lower assoc bindings just to deny them)
- #102493 (Group together more size assertions.)
- #102521 (rustdoc: add missing margin to no-docblock methods)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Group together more size assertions.
Also add a few more assertions for some relevant token-related types.
And fix an erroneous comment in `rustc_errors`.
r? `@lqd`
Flush delayed bugs before codegen
Sometimes it can happen that invalid code like a TyKind::Error makes its way through the compiler without triggering any errors (this is always a bug in rustc but bugs do happen sometimes :)). These ICEs will manifest in the backend like as cg_llvm not being able to get the layout of `[type error]`, which makes it hard to debug. By flushing before codegen, we display all the delayed bugs, making it easier to trace it to the root of the problem.
I tried this on #102366 and it showed tons of of delayed bugs and no error in cg_llvm, so it seems to be working.
This is 682889fb06591c4245422b73b005c5d8ae2d0cad, but for arrays instead.
For non-generics, this retains links to the array page, but instead of
trying to link it all, it only links the length part, which distinguishes
arrays from slices.
For generics, the entire thing becomes a link, just like slices.
rustdoc: remove no-op CSS `h3.variant, .sub-variant h4 { border-bottom: none }`
This rule, added in 69df43b041f76251391f11264c1ff763ca2a64a0 to override the default `h4` style, has been obsoleted when a65c98fefb78cddee955b87214732b0de30a769f changed it so that only the top docblock put `border-bottom` on `h4.`
Reinstate `hir-stats.rs` test for stage 1.
It was disabled in #94075 for stage 1 because that PR changed type layouts such that the results for this test were different for stage 1 and stage 2. But now that #94075 is in beta, the results for this test are now the same for stage 1 and stage 2.
r? ```@lqd```
remove the unused :: between trait and type to give user correct diag…
…nostic information
modified: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
new file: src/test/ui/type/issue-101866.rs
new file: src/test/ui/type/issue-101866.stderr
Manually order `DefId` on 64-bit big-endian
`DefId` uses different field orders on 64-bit big-endian vs. others, in
order to optimize its `Hash` implementation. However, that also made it
derive different lexical ordering for `PartialOrd` and `Ord`. That
caused spurious differences wherever `DefId`s are sorted, like the
candidate sources list in `report_method_error`.
Now we manually implement `PartialOrd` and `Ord` on 64-bit big-endian to
match the same lexical ordering as other targets, fixing at least one
test, `src/test/ui/methods/method-ambig-two-traits-cross-crate.rs`.
Added more const_closure functionality
Enables ConstFnMutClosure to use a tuple of mutable references instead of just a mutable reference to a tuple.
Removes the new function, since it would barely be usable with this new code.
r? `@fee1-dead`
Fix integer overflow in `format!("{:.0?}", Duration::MAX)`
Currently `format!("{:.0?}", Duration::MAX)` causes an integer overflow in the `Duration` `Debug` impl ([playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=67675c6895bdb2e37ee727f0ed7622b2)). This is because the carry from the rounding of the fractional_part into the integer_part will cause the integer_part to overflow as it is already `u64::MAX`. This PR uses a larger integer type to avoid that issue, and adds a test for the correct behaviour.
Adjust the s390x data layout for LLVM 16
LLVM [D131158] changed the SystemZ data layout to always set 64-bit
vector alignment, which used to be conditional on the "vector" feature.
[D131158]: https://reviews.llvm.org/D131158
r? `@nikic`