This commit does three things:
* First, it passes --cfg=bootstrap on stage 0 for rustdoc
invocations on proc_macro crates. This mirrors what we
do already for rustc invocations of those, and is needed
because cargo doesn't respect RUSTFLAGS or RUSTDOCFLAGS
when confronted with a proc macro.
* Second, it marks the bootstrap config variable as expected.
This is needed both on later stages where it's not set,
but also on stage 0, where it is set.
* Third, it adjusts the comment in the rustc wrapper to better
reflect the reason why we set the bootstrap variable as
expected: due to recent changes, setting it as expected
is also required even if the cfg variable is passed: ebf4cc361e0d0f11a25b42372bd629953365d17e .
This rule originated in 7669f04fb0ddc3d71a1fb44dc1c5c00a6564ae99, to
override the default, limited line-width that makes sense for prose, but
doesn't make sense for code (which typically uses hard-wrapped lines):
7669f04fb0/src/librustdoc/html/static/main.css (L153)
This line width limiter isn't applied to the `<div class="content">` node
any more. It's been moved to a separate wrapper `<div>` that used to be
called `main-inner` (in 135281ed1525db15edd8ebd092aa10aa40df2386) but is
now called `width-limiter` (since
d7528e2157762fadb9665518fd1e4dee6d6a2809).
This rule originated in 7669f04fb0ddc3d71a1fb44dc1c5c00a6564ae99, to
override the default, massive left margin that content used to accommodate
the sidebar:
7669f04fb0/src/librustdoc/html/static/main.css (L307-L309)
This massive left margin doesn't exist any more. It was replaced with a
flexbox-based sidebar layout in 135281ed1525db15edd8ebd092aa10aa40df2386.
Use memmem when searching for usages in ide-db
We already have this dependency, so there is no reason not to use it as it is generally faster than std in our use case.
rustdoc: remove no-op CSS `.block { padding: 0 }`
This rule was changed in 8fb1250aba8135679463351a3813c04ae45bf311 from the original version that had a non-zero padding. It's not needed, because it's not overriding anything that would've given `.block` a padding.
Extend CSS check to CSS variables
This PR is a bit big because the first commit is a rewrite of the CSS parser to something a bit simpler which still allows to get easily access to CSS properties name.
The other two are about adding tests and adding the CSS variables check.
This check was missing because we are relying more and more on CSS variables rather than CSS selectors in themes.
r? `@notriddle`
rustdoc mobile: move notable traits to return type
These were originally on the left, but were moved to the return type in c90fb7185a5febb00b7f8ccb49abceacd41bad6e. The CSS rule for mobile did not get updated at the time, so updating it now.
r? `@notriddle`