about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2021-07-10Change all instance of optflag added since the original change to optflagmulti.Zach Lute-4/+6
2021-07-10Change all 'optflag' arguments to 'optflagmulti'Zach Lute-15/+15
Because specifying these flags multiple times will never be discernibly different in functionality from specifying them a single time, there is no reason to fail and report an error to the user.
2021-07-10cleanup(rustdoc): remove unused function getObjectNameByIdMichael Howell-15/+8
This function was used in an earlier version, when idx's were used to serialize function inputs and outputs. That's not done any more, so removed the JS-side support for it.
2021-07-10Fix display for external trait implementorsGuillaume Gomez-4/+14
2021-07-08Rollup merge of #86903 - GuillaumeGomez:small-header-display, r=Nemo157Guillaume Gomez-6/+1
Fix small headers display You can see it on the `IoSlice` or on the `ErrorKind` pages. Before: ![Screenshot from 2021-07-06 15-26-33](https://user-images.githubusercontent.com/3050060/124610344-b50a8100-de70-11eb-8ab4-ac5de8adf18f.png) ![Screenshot from 2021-07-08 17-51-43](https://user-images.githubusercontent.com/3050060/124953436-7235de00-e015-11eb-9f99-b361c7eb41a9.png) After: ![Screenshot from 2021-07-08 17-48-42](https://user-images.githubusercontent.com/3050060/124953042-12d7ce00-e015-11eb-8132-1ae4552dd969.png) ![Screenshot from 2021-07-08 17-48-47](https://user-images.githubusercontent.com/3050060/124953052-13706480-e015-11eb-89f8-dab96c2f0f63.png) r? `@Nemo157`
2021-07-08Fix display of small-section-header elementsGuillaume Gomez-6/+1
2021-07-08Rework SESSION_GLOBALS API to prevent overwriting itGuillaume Gomez-15/+15
2021-07-07Clean up rustdoc static filesGuillaume Gomez-43/+44
2021-07-07Only show restricted pub useGuillaume Gomez-1/+2
2021-07-07Fix inconsistency on visibility display for typedefsGuillaume Gomez-2/+11
2021-07-07Fix reexports visibilityGuillaume Gomez-33/+30
2021-07-07Unify macro source displayGuillaume Gomez-58/+48
2021-07-07Fix rendering of reexported macros 2.0Guillaume Gomez-9/+46
2021-07-07Rollup merge of #86819 - GuillaumeGomez:cleanup-rustdoc-ids, r=jyn514Yuki Okushi-4/+11
Clean up rustdoc IDs I cherry-picked the commit from https://github.com/rust-lang/rust/pull/86178. It adds missing rustdoc IDs (for the HTML) and remove unused ones. cc `@camelid` r? `@jyn514`
2021-07-06only remove link for TyMethodFrançois Mockers-4/+4
2021-07-06review - better error names/docFrançois Mockers-8/+9
2021-07-06fix dead link for method in trait of blanket impl from third party crateFrançois Mockers-31/+47
2021-07-06Auto merge of #86644 - Stupremee:replace-fakedefids-with-itemid, r=jyn514bors-179/+188
rustdoc: Replace `FakeDefId` with new `ItemId` type Follow up from #84707 `@Manishearth` [suggested](https://github.com/rust-lang/rust/pull/84707#issuecomment-831994669) that there should be a new `ItemId` type that can distinguish between auto traits, normal ids, and blanket impls instead of using `FakeDefId`s. This type is introduced by this PR. There are still some `FIXME`s left, because I was unsure what the best solution for them would be. Especially the naming in general now is a bit weird right now and needs to be cleaned up. Now there are no "fake" ids so the `is_fake` method on `Item` does not really make sense and maybe the methods on `ItemId` should be renamed too? Also, we need to represent the new item ids in the JSON backend somehow.
2021-07-05rustdoc: Use `impl_id` and `for_` DefId's for Blanket item idJustus K-4/+4
2021-07-05rustdoc: Add `PrimitiveType` to `ItemId::Primitive`Justus K-8/+9
2021-07-05rustdoc: Convert new ItemId's to real Json IdsJustus K-3/+18
2021-07-05Revert "rustdoc: Store DefId's in ItemId on heap for decreasing Item's size"Justus K-115/+109
This reverts commit 41a345d4c46dad1a98c9993bc78513415994e8ba.
2021-07-05rustdoc: Store DefId's in ItemId on heap for decreasing Item's sizeJustus K-109/+115
2021-07-05rustdoc: Rename `expect_real` to `expect_def_id`, remove `Item::is_fake`Justus K-105/+103
2021-07-05rustdoc: Replace `FakeDefId` with new `ItemId` typeJustus K-86/+81
2021-07-05rustdoc: Remove unused Clean implsJoshua Nelson-46/+1
2021-07-05Remove `impl Clean for {Ident, Symbol}`Joshua Nelson-15/+1
These were only used once, in a place where it was trivial to replace. Also, it's unclear what 'clean' would mean for these, so it seems better to be explicit.
2021-07-05Auto merge of #86663 - fee1-dead:use-rustdoc-css, r=GuillaumeGomezbors-3/+2
Use rustdoc.css for error index Closes #86512.
2021-07-05Auto merge of #86282 - camelid:macro_rules-matchers, r=jyn514bors-47/+39
Pretty-print macro matchers instead of using source code Fixes #86208.
2021-07-03Pretty-print macro matchers instead of using source codeNoah Lev-47/+39
The output is not quite as nice as it used to be, but it does work.
2021-07-04Clean up rustdoc IDsGuillaume Gomez-4/+11
2021-07-03Warn when `rustdoc::` group is omitted from lint namesJoshua Nelson-1/+1
2021-07-02Rollup merge of #85749 - GuillaumeGomez:revert-smart-extern-crate-load, r=jyn514Guillaume Gomez-78/+37
Revert "Don't load all extern crates unconditionally" Fixes https://github.com/rust-lang/rust/issues/84738. This reverts https://github.com/rust-lang/rust/pull/83738. For the "smart" load of external crates, we need to be able to access their items in order to check their doc comments, which seems, if not impossible, quite complicated using only the AST. For some context, I first tried to extend the `IntraLinkCrateLoader` visitor by adding `visit_foreign_item`. Unfortunately, it never enters into this call, so definitely not the right place... I then added `visit_use_tree` to then check all the imports outside with something like this: ```rust let mut loader = crate::passes::collect_intra_doc_links::IntraLinkCrateLoader::new(resolver); ast::visit::walk_crate(&mut loader, krate); let mut items = Vec::new(); for import in &loader.imports_to_check { if let Some(item) = krate.items.iter().find(|i| i.id == *import) { items.push(item); } } for item in items { ast::visit::walk_item(&mut item); for attr in &item.attrs { loader.check_attribute(attr); } } ``` This was, of course, a failure. We find the items without problems, but we still can't go into the external crate to check its items' attributes. Finally, `@jyn514` suggested to look into the [`CrateLoader`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/creader/struct.CrateLoader.html), but it only seems to provide metadata (I went through [`CStore`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/creader/struct.CStore.html) and [`CrateMetadata`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/rmeta/decoder/struct.CrateMetadata.html)). I think we are too limited here (with AST only) to be able to determine the crates we actually need to import, but it's very likely that I missed something. Maybe `@petrochenkov` or `@Aaron1011` have an idea? So until we find a way to make it work completely, we need to revert it to fix the ICE. Once merged, we'll need to re-open #68427. r? `@jyn514`
2021-07-01Auto merge of #86791 - JohnTitor:rollup-96ltzpz, r=JohnTitorbors-19/+88
Rollup of 7 pull requests Successful merges: - #86148 (Check the number of generic lifetime and const parameters of intrinsics) - #86659 (fix(rustdoc): generics search) - #86768 (Add myself to mailmap) - #86775 (Test for const trait impls behind feature gates) - #86779 (Allow anyone to add or remove any label starting with perf-) - #86783 (Move Mutex::unlock to T: ?Sized) - #86785 (proc_macro/bridge: Remove dead code Slice type) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-07-01Auto merge of #86749 - bjorn3:link_info_refactor_part1, r=petrochenkovbors-3/+3
Rename all_crate_nums query to crates and remove useless wrapper Split out of https://github.com/rust-lang/rust/pull/86105 r? `@petrochenkov`
2021-07-01Revert "Don't load all extern crates unconditionally"Guillaume Gomez-78/+37
2021-07-01Rename all_crate_nums query to crates and remove useless wrapperbjorn3-3/+3
2021-07-01fix(rustdoc): generics searchMichael Howell-19/+88
This commit adds a test case for generics, re-adds generics data to the search index, and tweaks function indexing to use less space in JSON. This reverts commit 14ca89446c076bcf484d3d05bd991a4b7985a409.
2021-07-01Auto merge of #86757 - JohnTitor:rollup-acevhz7, r=JohnTitorbors-1/+2
Rollup of 8 pull requests Successful merges: - #85504 (the foundation owns rust trademarks) - #85520 (Fix typo and improve documentation for E0632) - #86680 (Improve error for missing -Z with debugging option) - #86728 (Check node kind to avoid ICE in `check_expr_return()`) - #86740 (copy rust-lld as ld in dist) - #86746 (Fix rustdoc query type filter) - #86750 (Test cross-crate usage of `feature(const_trait_impl)`) - #86755 (alloc: `RawVec<T, A>::shrink` can be in `no_global_oom_handling`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-07-01Rollup merge of #86746 - GuillaumeGomez:query-type-filter, r=notriddleYuki Okushi-1/+2
Fix rustdoc query type filter I realized while reviewing #86659 that the type filter was broken on search so I'd prefer it to get merged before merging #86659. r? `@notriddle`
2021-06-30Move AST crate.Camille GILLOT-3/+2
2021-06-30Inline lower_to_hir.Camille GILLOT-1/+0
2021-06-30Enforce search typed queriesGuillaume Gomez-1/+2
2021-06-30Auto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157bors-3/+9
Fix boldness (put it back where needed) I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).
2021-06-29Auto merge of #86725 - JohnTitor:normalizecss-8, r=GuillaumeGomezbors-3/+24
Upgrade normalize.css to v8.0.1 Fixes #86629, this addresses #82548 and #82542 with tweaks. I expect that this changes the style *slightly* but shouldn't have any major changes. Here's some changes I observed, I'd say they all are an improvement. <details> <summary>Before</summary> ![before 1](https://user-images.githubusercontent.com/25030997/123854746-0fc84800-d95a-11eb-8484-ea86dfe0ae14.png) ![before 2](https://user-images.githubusercontent.com/25030997/123854754-135bcf00-d95a-11eb-8cca-f49994629e08.png) </details> <details> <summary>After</summary> ![after 1](https://user-images.githubusercontent.com/25030997/123854809-21115480-d95a-11eb-9dd2-0d3b9ca45edd.png) ![after 2](https://user-images.githubusercontent.com/25030997/123854818-22428180-d95a-11eb-83aa-fb5a698124f9.png) </details> r? `@jsha`
2021-06-30Fix some style regressions due to normalize.css 8Yuki Okushi-2/+23
2021-06-30Upgrade normalize.css to v8.0.1Yuki Okushi-1/+1
2021-06-29Auto merge of #86603 - Mark-Simulacrum:stage-step, r=pietroalbinibors-2/+0
Update to new bootstrap compiler r? `@pietroalbini`
2021-06-28Move stab_tags to symbol in tablesStefan Schindler-4/+5
2021-06-28Update to new bootstrap compilerMark Rousskov-2/+0