about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2023-04-27refactor(docs): remove macro resolution fallbackbohan-14/+16
2023-04-26Rollup merge of #110847 - aDotInTheVoid:rdj-time-serialization, r=GuillaumeGomezMatthias Krüger-1/+4
rustdoc-json: Time serialization. This lets us know how much time is spent in json specific code, and how much performance we could gain by using a different serialization format. For aws-sdk-ec2, it takes 0.7s, out of a 43s build (of which 6s is spent in json specific code), and makes a 173M json file ``` $ cargo +rust_stage2 rustdoc -p aws-sdk-ec2 -- -Zunstable-options -w json -Ztime-passes Documenting aws-sdk-ec2 v0.26.0 (/home/gh-aDotInTheVoid/aws-sdk-rust/sdk/ec2) time: 5.229; rss: 64MB -> 891MB ( +827MB) expand_crate time: 5.230; rss: 61MB -> 891MB ( +830MB) macro_expand_crate time: 0.256; rss: 891MB -> 891MB ( +0MB) AST_validation time: 0.025; rss: 891MB -> 891MB ( +1MB) finalize_imports time: 0.093; rss: 891MB -> 891MB ( +0MB) compute_effective_visibilities time: 0.122; rss: 891MB -> 891MB ( +0MB) finalize_macro_resolutions time: 2.442; rss: 891MB -> 1188MB ( +297MB) late_resolve_crate time: 0.120; rss: 1188MB -> 1190MB ( +2MB) resolve_check_unused time: 0.211; rss: 1190MB -> 1190MB ( +0MB) resolve_postprocess time: 3.017; rss: 891MB -> 1190MB ( +299MB) resolve_crate time: 8.520; rss: 61MB -> 1181MB (+1120MB) prepare_outputs time: 0.152; rss: 1181MB -> 1181MB ( +0MB) complete_gated_feature_checking time: 0.539; rss: 1633MB -> 1632MB ( -1MB) drop_ast time: 15.492; rss: 58MB -> 1621MB (+1563MB) type_collecting time: 1.503; rss: 1621MB -> 1705MB ( +84MB) item_types_checking time: 1.274; rss: 1705MB -> 1726MB ( +21MB) crate_lints time: 1.275; rss: 1705MB -> 1726MB ( +21MB) missing_docs time: 0.281; rss: 1726MB -> 1726MB ( +0MB) check_mod_attrs time: 0.433; rss: 1744MB -> 1750MB ( +6MB) clean_crate time: 11.581; rss: 1750MB -> 2107MB ( +357MB) collect_synthetic_impls time: 0.019; rss: 2107MB -> 2107MB ( +0MB) collect_items_for_trait_impls time: 12.588; rss: 1750MB -> 2139MB ( +389MB) collect-trait-impls time: 0.197; rss: 2139MB -> 2139MB ( +0MB) check_doc_test_visibility time: 0.281; rss: 2139MB -> 2150MB ( +11MB) strip-hidden time: 0.260; rss: 2150MB -> 2150MB ( +0MB) strip-private warning: unresolved link to `date` --> sdk/ec2/src/client/describe_instances.rs:7:11184 | 7 | ...te of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter.<... | ^^^^ no item named `date` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default time: 0.363; rss: 2150MB -> 2150MB ( +0MB) collect-intra-doc-links time: 0.946; rss: 2150MB -> 2150MB ( +0MB) propagate-doc-cfg time: 0.494; rss: 2150MB -> 2152MB ( +2MB) run-lints time: 0.658; rss: 2152MB -> 2163MB ( +11MB) create_format_cache time: 34.818; rss: 58MB -> 2163MB (+2105MB) run_global_ctxt time: 0.016; rss: 2163MB -> 2163MB ( +0MB) create_renderer(json) time: 0.723; rss: 2780MB -> 2780MB ( +0MB) rustdoc_json_serialization time: 2.216; rss: 2399MB -> 2599MB ( +199MB) renderer_after_krate(json) time: 6.639; rss: 2163MB -> 2417MB ( +254MB) render_json time: 0.312; rss: 2417MB -> 2071MB ( -346MB) free_global_ctxt warning: `aws-sdk-ec2` (lib doc) generated 1 warning Finished dev [unoptimized + debuginfo] target(s) in 43.06s ``` [(Zulip Discussion)](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/JSON.20metadata.20speed/near/352783145) r? `@GuillaumeGomez`
2023-04-26Rollup merge of #110835 - nnethercote:strict-region-folders-2, r=compiler-errorsMatthias Krüger-1/+3
Make some region folders a little stricter. Because certain regions cannot occur in them. r? ``@compiler-errors``
2023-04-26Rollup merge of #110798 - ozkanonur:rustdoc-unused-extern-crates, r=jyn514Matthias Krüger-0/+8
pass `unused_extern_crates` in `librustdoc::doctest::make_test` blocker for https://github.com/rust-lang/rust/pull/106621
2023-04-26rustdoc-json: Time serialization.Alona Enraght-Moony-1/+4
2023-04-26Fix uses of `TraitRef::identity` in clippy and rustdocMaybe Waffle-1/+1
2023-04-26Make some region folders a little stricter.Nicholas Nethercote-1/+3
Because certain regions cannot occur in them.
2023-04-25Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, ↵Matthias Krüger-6/+7
r=compiler-errors Switch to `EarlyBinder` for `explicit_item_bounds` Part of the work to finish https://github.com/rust-lang/rust/issues/105779. This PR adds `EarlyBinder` to the return type of the `explicit_item_bounds` query and removes `bound_explicit_item_bounds`. r? `@compiler-errors` (hope it's okay to request you, since you reviewed #110299 and #110498 :smiley:)
2023-04-25Use `ty::TraitRef::new` in rustdocMaybe Waffle-1/+1
2023-04-25pass `unused_extern_crates` in `librustdoc::doctest::make_test`ozkanonur-0/+8
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-24rustdoc-search: add slices and arrays to indexMichael Howell-2/+28
This indexes them as primitives with generics, so `slice<u32>` is how you search for `[u32]`, and `array<u32>` for `[u32; 1]`. A future commit will desugar the square bracket syntax to search both arrays and slices at once.
2023-04-24Fix `rustc_index` imports outside the compilerMaybe Waffle-1/+1
2023-04-24Rollup merge of #110514 - compiler-errors:remove-find_map_relevant_impl, ↵Matthias Krüger-9/+11
r=b-naber Remove `find_map_relevant_impl` Fixes #108895
2023-04-23Rollup merge of #110661 - notriddle:notriddle/settings-js-handlekey, ↵Matthias Krüger-19/+1
r=GuillaumeGomez rustdoc: clean up settings.css and settings.js `handleKey` was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097 and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser-native checkbox was `display: none`, breaking native keyboard accessibility. The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more. [behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics The other, one line change to settings.css is follow-up to #110205
2023-04-23Auto merge of #108118 - oli-obk:lazy_typeck, r=cjgillotbors-2/+0
Run various queries from other queries instead of explicitly in phases These are just legacy leftovers from when rustc didn't have a query system. While there are more cleanups of this sort that can be done here, I want to land them in smaller steps. This phased order of query invocations was already a lie, as any query that looks at types (e.g. the wf checks run before) can invoke e.g. const eval which invokes borrowck, which invokes typeck, ...
2023-04-22Rollup merge of #110659 - notriddle:notriddle/js-cleanup-20230421, ↵Yuki Okushi-11/+6
r=GuillaumeGomez rustdoc: clean up JS * use `Set` for ignored crates in cross-crate trait impl JS, instead of `indexOf` string manipulation * lift constant `window.location.split` code out of a loop in source code sidebar builder * remove redundant history manipulation from search page exit
2023-04-22Rollup merge of #109949 - notriddle:notriddle/type-layout, r=jshaYuki Okushi-116/+154
rustdoc: migrate `document_type_layout` to askama
2023-04-21rustdoc: remove unused CSS `color: inherit`Michael Howell-1/+0
This code was added back when `border-color: currentColor` was used. Since it was changed in ad9a89eef2857a24ef049b9eee2d1db5bcbf1d11, the current color is not used any more.
2023-04-21rustdoc: remove unneeded handleKey from settings.jsMichael Howell-18/+1
This code was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097 and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser- native checkbox was `display: none`, breaking native keyboard accessibility. The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more. [behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics
2023-04-21Leave it to the query system to invoke the typeck query instead of invoking ↵Oli Scherer-2/+0
it eagerly. Later queries that are run on all body owners will invoke typeck as they need information from its result to perform their own logic
2023-04-21rustdoc: clean up redundant search hiding results codeMichael Howell-8/+1
* There's no need to call `history.replaceState` right before calling `searchState.hideResults`, which already does it. * There's no need to implement hiding search results when that is already implemented.
2023-04-21rustdoc: lift constant string manipulation out of loopMichael Howell-1/+1
2023-04-21rustdoc: use Set for ignored crates, instead of string matchingMichael Howell-2/+4
2023-04-21rustdoc: remove unnecessary bindingMichael Howell-5/+4
2023-04-21rustdoc: factor `document_type_layout` into its own moduleMichael Howell-77/+90
2023-04-21rustdoc: get rid of redundant, nested `let` linesMichael Howell-17/+13
2023-04-20rustdoc-search: use more descriptive "x not found; y instead" messageMichael Howell-1/+1
2023-04-20rustdoc-search: make type name correction choice deterministicMichael Howell-0/+3
2023-04-20rustdoc-search: clean up `checkIfInGenerics` call at end of `checkType`Michael Howell-5/+1
2023-04-20add subst_identity_iter and subst_identity_iter_copied methods on ↵Kyle Matsuda-4/+2
EarlyBinder; use this to simplify some EarlyBinder noise around explicit_item_bounds calls
2023-04-20add EarlyBinder to output of explicit_item_bounds; replace ↵Kyle Matsuda-3/+3
bound_explicit_item_bounds usages; remove bound_explicit_item_bounds query
2023-04-20change usages of explicit_item_bounds to bound_explicit_item_boundsKyle Matsuda-8/+11
2023-04-20Remove WithOptconstParam.Camille GILLOT-2/+2
2023-04-19rustdoc-search: give longer notification for type correctionsMichael Howell-2/+7
2023-04-19Fix missing blanket impl if the trait is not directly publicGuillaume Gomez-1/+1
2023-04-19Remove find_map_relevant_implMichael Goulet-9/+11
2023-04-18rustdoc: format type layout template with newline after `<p>`Michael Howell-8/+16
2023-04-18rustdoc: create variants list outside of templateMichael Howell-63/+60
2023-04-18rustdoc: use a separate template for type layout sizeMichael Howell-12/+24
2023-04-18Rollup merge of #110450 - GuillaumeGomez:fix-nested-items-on-private-doc, ↵Matthias Krüger-10/+38
r=notriddle,jyn514 rustdoc: Fix invalid handling of nested items with `--document-private-items` Fixes #110422. The problem is that only impl block and re-exported `macro_rules!` items are "visible" as nested items. This PR adds the missing checks to handle this correctly. cc `@compiler-errors` r? `@notriddle`
2023-04-18Rollup merge of #110348 - ↵Matthias Krüger-0/+2
GuillaumeGomez:disambiguators-suffixes-rustdoc-book, r=Manishearth Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book This information is otherwise only provided in case an error occurs, which isn't great. r? ```@notriddle```
2023-04-17rustdoc: restructure type search engine to pick-and-use IDsMichael Howell-196/+227
This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items. This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
2023-04-17rustdoc-search: fix incorrect doc commentMichael Howell-1/+1
2023-04-17Fix invalid handling of nested items with `--document-private-items`Guillaume Gomez-5/+35
2023-04-17Remove unused RustdocVisitor::visit_item_inner return typeGuillaume Gomez-5/+3
2023-04-17Add code comment to remind contributors to update rustdoc book if they ↵Guillaume Gomez-0/+2
update the disambiguators list
2023-04-17Rollup merge of #110421 - jsoref:spelling-librustdoc, r=notriddleMatthias Krüger-23/+23
Spelling librustdoc This is split from https://github.com/rust-lang/rust/pull/110392 There's one change to src/tools/rustdoc-gui/tester.js which feels like a reasonable thing to piggy-back here.
2023-04-17Rollup merge of #110404 - matthiaskrgr:mapmap, r=NilstriebMatthias Krüger-4/+3
fix clippy::toplevel_ref_arg and ::manual_map r? ``@Nilstrieb``
2023-04-17Rollup merge of #110341 - notriddle:notriddle/main-js-replacestate, ↵Matthias Krüger-4/+2
r=GuillaumeGomez rustdoc: stop passing a title to `replaceState` second argument As described on [MDN's replaceState page], this parameter is not currently used, and the empty string is "safe against future changes to the method." [MDN's replaceState page]: https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
2023-04-16Spelling librustdocJosh Soref-23/+23
* associated * collected * correspondence * inlining * into * javascript * multiline * variadic Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>