about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2022-12-06Rollup merge of #105388 - notriddle:notriddle/item-stab-font-size, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove redundant CSS `.import-item .stab { font-size }` This sets the exact same font size that `.stab` has by default anyway. It used to be slightly different, but dd5ff428edbc7cd4fa600b81f27bbec28589704f made it identical.
2022-12-06rustdoc: remove redundant CSS `.import-item .stab { font-size }`Michael Howell-1/+0
This sets the exact same font size that `.stab` has by default anyway. It used to be slightly different, but dd5ff428edbc7cd4fa600b81f27bbec28589704f made it identical.
2022-12-06Rollup merge of #105320 - notriddle:notriddle/rustdoc-toggle-hideme-2, ↵Matthias Krüger-9/+2
r=GuillaumeGomez rustdoc: simplify CSS selectors on top-doc and non-exhaustive toggles This code uses a special `hideme` class anyway, so just style that.
2022-12-06Rollup merge of #105309 - notriddle:notriddle/sidebar-margin-padding, ↵Yuki Okushi-2/+0
r=GuillaumeGomez rustdoc: remove no-op mobile CSS `.sidebar { margin: 0; padding: 0 }` This isn't overriding anything, because the sidebar never has a margin or padding on it.
2022-12-06Rollup merge of #104967 - willcrichton:fix-scrape-examples, r=notriddleYuki Okushi-3/+5
Fix UI issues with Rustdoc scrape-examples feature. A few regressions have been introduced into scrape-examples in the last few months. This commit fixes those regressions: * Help file was being loaded from the wrong place (introduced in f9e1f6ffdf03ec33cb29e20c88fc7bcc938c7f42). * CSS selector in JS has a typo (introduced in 14897180ae6a0506a5ad0a9f6a30ae1f75916179). * Line numbers in scraped example code snippets are overflowing (not sure if this was ever fixed). Changing from flexbox to grid display fixed this issue.
2022-12-05rustdoc: simplify CSS selectors on top-doc and non-exhaustive togglesMichael Howell-9/+2
This code uses a special `hideme` class anyway, so just style that.
2022-12-05rustdoc: remove no-op mobile CSS `.sidebar { margin: 0; padding: 0 }`Michael Howell-2/+0
This isn't overriding anything, because the sidebar never has a margin or padding on it.
2022-12-05Auto merge of #104824 - klensy:bump-some, r=Mark-Simulacrumbors-1/+1
deps: update cpufeatures, swap difference to dissimilar Updating cpufeatures v0.2.1 -> v0.2.5: https://github.com/RustCrypto/utils/blob/master/cpufeatures/CHANGELOG.md#025-2022-09-04, was yanked bc of miscompile (https://github.com/RustCrypto/utils/pull/800, https://github.com/rust-lang/rust/issues/101346) Removing difference v2.0.0 Adding dissimilar v1.0.4 Updating expect-test v1.0.1 -> v1.4.0 difference unmaintened https://rustsec.org/advisories/RUSTSEC-2020-0095.html, so replaced with https://github.com/dtolnay/dissimilar (as dependency of `expect-test`)
2022-12-05Remove `mk_name_value_item{,_str}`.Nicholas Nethercote-14/+20
There are better ways to create the meta items. - In the rustdoc tests, the commit adds `dummy_meta_item_name_value`, which matches the existing `dummy_meta_item_word` function and `dummy_meta_item_list` macro. - In `types.rs` the commit clones the existing meta item and then modifies the clone.
2022-12-04Auto merge of #104757 - camelid:consolidate-lints, ↵bors-499/+439
r=GuillaumeGomez,jyn514,Manishearth Consolidate rustdoc's lint passes into a single pass This should improve performance and simplify the code. r? `@GuillaumeGomez`
2022-12-03Auto merge of #105183 - GuillaumeGomez:merge-and-dedup-predicates, r=notriddlebors-33/+91
Merge generics and where predicates and prevent duplicates in where predicates Part of #104886 (I didn't include bounds from parent trait yet as I think the PR is already big enough). Also we'll need to run a perf check. cc `@fmease` since you worked a bit on this. r? `@notriddle`
2022-12-03Rollup merge of #105189 - notriddle:notriddle/rustdoc-toggle-hideme, ↵Yuki Okushi-8/+2
r=GuillaumeGomez rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`
2022-12-03Rollup merge of #105182 - aDotInTheVoid:rdj-no-foreign-traits, ↵Yuki Okushi-52/+1
r=Enselic,GuillaumeGomez Rustdoc-Json: Don't inline foreign traits It wasn't done correctly, and [we want to move towards only having local items in the index, and making foreign items easier to resolved](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Rustdoc.20JSON.3A.20Include.20All.20Foreign.20Items.3F) Fixes #105025. This means #105015 is included to test this Fixes #105022 r? `@GuillaumeGomez`
2022-12-02rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`Michael Howell-8/+2
2022-12-02Rollup merge of #105155 - notriddle:notriddle/flexbox-help-settings-buttons, ↵Matthias Krüger-19/+10
r=GuillaumeGomez rustdoc: clean up help and settings button CSS The old version of this code specified a bunch of different numbers that had to line up just right to get the size it wanted. This version uses flexbox centering, specifies the font size, and lets the browser figure out the rest of the layout automatically. Preview: http://notriddle.com/notriddle-rustdoc-demos/flexbox-help-settings-buttons/test_dingus/
2022-12-02Merge generics and where predicates and prevent duplicates in where predicatesGuillaume Gomez-33/+91
2022-12-02Rustdoc-Json: Don't include foreign traitsNixon Enraght-Moony-52/+1
2022-12-02Auto merge of #104863 - nnethercote:reduce-lint-macros, r=cjgillotbors-4/+1
Reduce macro usage for lints r? `@cjgillot`
2022-12-02Rollup merge of #105143 - notriddle:notriddle/scraped-example-list-font, ↵Matthias Krüger-3/+1
r=GuillaumeGomez rustdoc: use simpler CSS for setting the font on scraped examples
2022-12-02Rollup merge of #105132 - GuillaumeGomez:migrate-summary-toggle-to-var, ↵Matthias Krüger-8/+4
r=notriddle Migrate summary toggle filter to CSS variable r? `@notriddle`
2022-12-02Auto merge of #104963 - petrochenkov:noaddids2, r=cjgillotbors-44/+60
rustc_ast_lowering: Stop lowering imports into multiple items Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-02Remove `-Zno-interleave-lints`.Nicholas Nethercote-4/+1
Because it complicates lint implementation greatly.
2022-12-01rustdoc: clean up help and settings button CSSMichael Howell-13/+8
The old version of this code specified a bunch of different numbers that had to line up just right to get the size it wanted. This version uses flexbox centering, specifies the font size, and lets the browser figure out the rest of the layout automatically.
2022-12-01rustdoc: clean up button-hiding mobile CSSMichael Howell-6/+2
2022-12-01rustdoc: use simpler CSS for setting the font on scraped examplesMichael Howell-3/+1
2022-12-01rustc_ast_lowering: Stop lowering imports into multiple itemsVadim Petrochenkov-1/+1
Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-01rustc_hir: Change representation of import paths to support multiple resolutionsVadim Petrochenkov-41/+57
2022-12-01Migrate summary toggle filter to CSS variableGuillaume Gomez-8/+4
2022-12-01rustc_hir: Relax lifetime requirements on `Visitor::visit_path`Vadim Petrochenkov-2/+2
2022-12-01Rollup merge of #105088 - notriddle:notriddle/search-results-div-desc, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove redundant CSS `div.desc { display: block }` DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748bb9b73c210558498070ae0b7ed8193ddf.
2022-11-30Rollup merge of #105086 - notriddle:notriddle/sidebar-css, r=GuillaumeGomezMatthias Krüger-7/+5
rustdoc: clean up sidebar link CSS Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on. Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
2022-11-30Rollup merge of #105064 - notriddle:notriddle/main-min-width, r=GuillaumeGomezMatthias Krüger-1/+1
rustdoc: add comment to confusing CSS `main { min-width: 0 }` This CSS was added in cad0fce2053d52b7ba04c458f4c124c8b5c6141e, but the reason why it was necessary was unclear. This comment makes it clear.
2022-11-30rustdoc: remove redundant CSS `div.desc { display: block }`Michael Howell-1/+0
DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748bb9b73c210558498070ae0b7ed8193ddf.
2022-11-30rustdoc: clean up sidebar link CSSMichael Howell-7/+5
Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on. Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
2022-11-30Auto merge of #104905 - compiler-errors:normalization-changes, r=spastorinobors-2/+2
Some initial normalization method changes 1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`) 2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`) 3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize` 4. Remove some unused other normalization fns in `Inherited` and `FnCtxt` Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic. Stacked on top of #104835 for convenience. r? types
2022-11-29rustdoc: add comment to confusing CSS `main { min-width: 0 }`Michael Howell-1/+1
This CSS was added in cad0fce2053d52b7ba04c458f4c124c8b5c6141e, but the reason why it was necessary was unclear. This comment makes it clear.
2022-11-29rustdoc: use shorthand background for rustdoc toggle CSSMichael Howell-6/+2
2022-11-29update cpufeatures, swap difference to dissimilarklensy-1/+1
2022-11-29Rollup merge of #105024 - notriddle:notriddle/fnname, r=jyn514Matthias Krüger-3/+2
rustdoc: remove `fnname` CSS class that's styled exactly like `fn` It's not obvious why this was ever a separate class name, since even in c4219a478354b464079b1b7ab081e071e8e39765 when it was first added, it was styled identically to regular `fn` links.
2022-11-29Rollup merge of #105020 - notriddle:notriddle/rustdoc-toggle, r=GuillaumeGomezMatthias Krüger-8/+1
rustdoc: merge background-image rules in rustdoc-toggle CSS
2022-11-29Rollup merge of #105016 - GuillaumeGomez:load-sentence-rustdoc, r=notriddleMatthias Krüger-8/+12
Add sentence when rustdoc search is running This is a small improvement, mostly relevant on big search indexes. As soon as the search starts, it'll display: ![image](https://user-images.githubusercontent.com/3050060/204336014-4660634a-09a0-4d5e-a772-d7e1e810dddf.png) cc ``@jsha`` r? ``@notriddle``
2022-11-28rustdoc: remove `fnname` CSS class that's styled exactly like `fn`Michael Howell-3/+2
It's not obvious why this was ever a separate class name, since even in c4219a478354b464079b1b7ab081e071e8e39765 when it was first added, it was styled identically to regular `fn` links.
2022-11-28partially_normalize_... -> At::normalizeMichael Goulet-1/+1
2022-11-28Rename At::normalize to At::query_normalizeMichael Goulet-1/+1
2022-11-28rustdoc: merge background-image rules in rustdoc-toggle CSSMichael Howell-8/+1
2022-11-28Add sentence when rustdoc search is runningGuillaume Gomez-8/+12
2022-11-28Rollup merge of #104804 - nnethercote:MetaItemLit, r=petrochenkovMatthias Krüger-3/+3
Rename `ast::Lit` as `ast::MetaItemLit`. And some other literal cleanups. r? `@petrochenkov`
2022-11-28Rollup merge of #104732 - WaffleLapkin:from_def_idn't, r=compiler-errorsDylan DPC-1/+1
Refactor `ty::ClosureKind` related stuff I've tried to fix all duplication and weirdness, but if I missed something do tell :p r? `@compiler-errors`
2022-11-28Rename `NestedMetaItem::[Ll]iteral` as `NestedMetaItem::[Ll]it`.Nicholas Nethercote-3/+3
We already use a mix of `Literal` and `Lit`. The latter is better because it is shorter without causing any ambiguity.
2022-11-27Rollup merge of #104984 - GuillaumeGomez:remote-crate-primitives, r=notriddleMatthias Krüger-5/+6
Remove Crate::primitives field It is a new approach to #90447. Instead of removing primitives from everywhere (ie from `BadImplStripper`), I just removed them from the `Crate` type, allowing to reduce its size. cc `@camelid` r? `@notriddle`