-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 14 pull requests #93021
Rollup of 14 pull requests #93021
Conversation
These attributes are only checked at the crate root, so they should have a warning if they are used anywhere else.
This hides the paintbrush icon on most pages by default, in preference for the settings on the settings page. When loading from a local file, and not in mobile view, continue to show the theme picker. That's because some browsers limit access to localStorage from file:/// URLs, so choosing a theme from settings.html doesn't take effect.
This allows just testing the text, in cases where the HTML tags don't matter.
…ets. llvm-libunwind does not support s390x targets at present, so we cannot build it for s390x targets. Accordingly, remove it from the self-contained set.
- Make "since" version numbers grey again (regressed in rust-lang#92602). - Remove unneeded selectors for when crate filter dropdown is a sibling of search-input. - Crate filter dropdown doesn't need to be 100% width on mobile. - Only build crate filter dropdown when there is more than one crate. - Remove unused addCrateDropdown.
When the user clicks outside the sidebar, the sidebar should close. Also, when the user clicks an internal link in the sidebar, it should close.
…uillaumeGomez Pick themes on settings page, not every page This hides the paintbrush icon on most pages by default, in preference for the settings on the settings page. When loading from a local file, and not in mobile view, continue to show the theme picker. That's because some browsers limit access to localStorage from file:/// URLs, so choosing a theme from settings.html doesn't take effect. Fixes rust-lang#84539 Part of rust-lang#59840 r? `@GuillaumeGomez` Demo: https://rustdoc.crud.net/jsha/theme-picker-local-only-2/std/io/trait.Read.html
…ype, r=lcnr Fix ICEs related to `Deref<Target=[T; N]>` on newtypes 1. Stash a const infer's type into the canonical var during canonicalization, so we can recreate the fresh const infer with that same type. For example, given `[T; _]` we know `_` is a `usize`. If we go from infer => canonical => infer, we shouldn't forget that variable is a usize. Fixes rust-lang#92626 Fixes rust-lang#83704 2. Don't stash the autoderef'd slice type that we get from method lookup, but instead recreate it during method confirmation. We need to do this because the type we receive back after picking the method references a type variable that does not exist after probing is done. Fixes rust-lang#92637 ... A better solution for the second issue would be to actually _properly_ implement `Deref` for `[T; N]` instead of fixing this autoderef hack to stop leaking inference variables. But I actually looked into this, and there are many complications with const impls.
…matthewjasper Add some more attribute validation This adds some more validation for the position of attributes: * `link` is only valid on an `extern` block * `windows_subsystem` and `no_builtins` are only valid at the crate level
Hide mobile sidebar on some clicks When the user clicks outside the sidebar, the sidebar should close. Also, when the user clicks an internal link in the sidebar, it should close. Fixes rust-lang#92682 Demo: https://rustdoc.crud.net/jsha/hide-sidebar/std/string/struct.String.html
Rustdoc style cleanups - Make "since" version numbers grey again (regressed in rust-lang#92602). - Remove unneeded selectors for when crate filter dropdown is a sibling of search-input. - Crate filter dropdown doesn't need to be 100% width on mobile. - Only build crate filter dropdown when there is more than one crate. - Remove unused addCrateDropdown Demo: https://rustdoc.crud.net/jsha/style-cleanups/std/string/struct.String.html r? `@GuillaumeGomez`
…ulacrum "Does exists" typos fix Fixed some typos
add `rustc_diagnostic_item` attribute to `AtomicBool` type I wanted to use this in clippy and found that it didn't work. So hopefully this addition will fix it.
…omez htmldocck: Add support for `/text()` in `@snapshot` This allows just testing the text, in cases where the HTML tags don't matter. See rust-lang#92908 (comment) for an example of when this would be useful. r? `@GuillaumeGomez`
Abstract the pretty printer's ringbuffer to be infinitely sized This PR backports dtolnay/prettyplease@8e5e83c from the `prettyplease` crate into `rustc_ast_pretty`. Using a dedicated RingBuffer type with non-wrapping indices, instead of manually `%`-ing indices into a capped sized buffer, unlocks a number of simplifications to the pretty printing algorithm implementation in followup commits such as dtolnay/prettyplease@fcb5968 and dtolnay/prettyplease@4427ced. This change also greatly reduces memory overhead of the pretty printer. The old implementation always grows its buffer to 205920 bytes even for files without deeply nested code, because it only wraps its indices when they hit the maximum tolerable size of the ring buffer (the size after which the pretty printer will crash if there are that many tokens buffered). In contrast, the new implementation uses memory proportional to the peak number of simultaneously buffered tokens only, not the number of tokens that have ever been in the buffer. Speaking of crashing the pretty printer and "maximum tolerable size", the constant used for that in the old implementation is a lie: https://github.com/rust-lang/rust/blob/de9b573eedaaa6d6e7c00c986cccbee802f9287b/compiler/rustc_ast_pretty/src/pp.rs#L227-L228 It was raised from 3 to 55 in rust-lang#33934 because that was empirically the size that avoided crashing on one particular test crate, but according to rust-lang#33934 (comment) other syntax trees still crash at that size. There is no reason to believe that any particular size is good enough for arbitrary code, and using a large number like 55 adds overhead to inputs that never need close to that much of a buffer. The new implementation eliminates this tradeoff.
… r=Mark-Simulacrum Exclude llvm-libunwind from the self-contained set on s390x-musl targets llvm-libunwind does not support s390x targets at present, so we cannot build it for s390x targets. Accordingly, remove it from the self-contained set.
…amelid rustdoc: Use `intersperse` in a `visit_path` function (~~Is there a better way to word the title?~~ Eh, this works, I guess.) I'm surprised that the compiler didn't complain when I left out the `.to_string()`, but hey, if it works then it works.
Add `~const` bound test for negative impls Resolves rust-lang#92114 which has been fixed in rust-lang#92892.
…ikic update codegen test for LLVM 14 Fixes rust-lang#93003.
…Simulacrum Stabilize vec_spare_capacity Closes rust-lang#75017
@bors r+ rollup=never p=14 |
📌 Commit 83b1a94 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (7531d2f): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Successful merges:
Deref<Target=[T; N]>
on newtypes #92640 (Fix ICEs related toDeref<Target=[T; N]>
on newtypes)rustc_diagnostic_item
attribute toAtomicBool
type #92870 (addrustc_diagnostic_item
attribute toAtomicBool
type)/text()
in@snapshot
#92914 (htmldocck: Add support for/text()
in@snapshot
)intersperse
in avisit_path
function #92947 (rustdoc: Useintersperse
in avisit_path
function)~const
bound test for negative impls #92997 (Add~const
bound test for negative impls)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup