about summary refs log tree commit diff
path: root/src/librustdoc/json/mod.rs
AgeCommit message (Collapse)AuthorLines
2021-10-08Rollup merge of #89669 - Urgau:json-remove-type-never, r=GuillaumeGomezGuillaume Gomez-1/+1
Remove special-casing of never primitive in rustdoc-json-types Fixes https://github.com/rust-lang/rust/issues/89349 r? `@GuillaumeGomez`
2021-10-08clippy::complexity fixesMatthias Krüger-1/+1
2021-10-08Remove special-casing of never primitive in rustdoc-json-typesLoïc BRANSTETT-1/+1
2021-10-04Rollup merge of #88234 - hkmatsumoto:rustdoc-impls-for-primitive, r=jyn514Manish Goregaokar-2/+21
rustdoc-json: Don't ignore impls for primitive types Fix the issue discussed at [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.E2.9C.94.20Json.20output.20lacks.20some.20item.20which.20are.20supposed.20to.20be.20there) r? ``@jyn514``
2021-09-29Don't ignore impls for primitive typesHirochika Matsumoto-2/+21
2021-09-26Fix populate of union.implsLoïc BRANSTETT-0/+2
2021-09-02rustdoc: Clean up handling of lifetime boundsNoah Lev-1/+1
Previously, rustdoc recorded lifetime bounds by rendering them into the name of the lifetime parameter. Now, it leaves the name as the actual name and instead records lifetime bounds in an `outlives` list, similar to how type parameter bounds are recorded.
2021-07-05Revert "rustdoc: Store DefId's in ItemId on heap for decreasing Item's size"Justus K-7/+7
This reverts commit 41a345d4c46dad1a98c9993bc78513415994e8ba.
2021-07-05rustdoc: Store DefId's in ItemId on heap for decreasing Item's sizeJustus K-7/+7
2021-07-05rustdoc: Rename `expect_real` to `expect_def_id`, remove `Item::is_fake`Justus K-3/+3
2021-07-05rustdoc: Replace `FakeDefId` with new `ItemId` typeJustus K-7/+7
2021-06-07format versionEllen-1/+1
2021-05-15Minimize amount of fake `DefId`s used in rustdocJustus K-7/+8
2021-05-04Add type to differentiate between fake and real DefId'sJustus K-7/+8
2021-04-29only store locations in extern_locationsTimothée Delabrouille-5/+6
2021-04-24rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()`Joshua Nelson-15/+2
The JSON renderer no longer gets called on modules.
2021-04-22Remove unnecessary item_name parameter to `mod_item_in`Joshua Nelson-1/+1
2021-04-22Remove unnecessary `item_name` parameter to `mod_item_out`Joshua Nelson-4/+0
2021-04-22Remove unnecessary `edition` parameter to rendererJoshua Nelson-2/+0
2021-04-22Remove unnecessary `diag` parameter to `after_krate`Joshua Nelson-1/+1
2021-04-22Remove unnecessary `crate_name` parameter to `after_krate`Joshua Nelson-6/+2
It's always `tcx.crate_name(LOCAL_CRATE)`, it doesn't need to be passed in separately.
2021-03-26Rollup merge of #83055 - aDotInTheVoid:selective-strip-item-doc, r=jyn514Dylan DPC-1/+5
[rustdoc] Don't document stripped items in JSON renderer. Fixes #80664, see [my comment there](https://github.com/rust-lang/rust/issues/80664#issuecomment-797557948) for why Note that we already do something similar in `convert_item`: https://github.com/rust-lang/rust/blob/bb4cdf8ec034dca5c056ec9295f38062e5b7e871/src/librustdoc/json/conversions.rs#L28-L31 ``@rustbot`` modify labels: +T-rustdoc +A-rustdoc-json r? ``@jyn514`` cc ``@CraftSpider``
2021-03-24Rework rustdoc const typeGuillaume Gomez-3/+7
2021-03-24Don't call `item` on modules for json rendererNixon Enraght-Moony-1/+5
Closes #80664
2021-03-24Rollup merge of #83415 - camelid:remove-crate-module-option, r=jyn514Dylan DPC-2/+2
Remove unnecessary `Option` wrapping around `Crate.module` I'm wondering if it was originally there so that we could `take` the module which enables `after_krate` to take an `&Crate`. However, the two impls of `after_krate` only use `Crate.name`, so we can pass just the name instead.
2021-03-23Remove unnecessary `Option` wrapping around `Crate.module`Camelid-2/+2
I'm wondering if it was originally there so that we could `take` the module which enables `after_krate` to take an `&Crate`. However, the two impls of `after_krate` only use `Crate.name`, so we can pass just the name instead.
2021-03-21Bump rustdoc-json format versionCamelid-1/+1
The rustdoc-json-types renames are breaking changes.
2021-03-21Rename `rustdoc_json_types::Item.source` to `span`Camelid-1/+1
2021-03-09Auto merge of #82356 - camelid:render-cleanup, r=GuillaumeGomezbors-0/+4
rustdoc: Cleanup `html::render::Context` - Move most shared fields to `SharedContext` (except for `cache`, which isn't mutated anyway) - Replace a use of `Arc` with `Rc` - Make a bunch of fields private - Add static size assertion for `Context` - Don't share `id_map` and `deref_id_map`
2021-03-06Revert fmt version, add rustdoc-json-types to bootstrap testsRune Tynan-1/+1
2021-03-06Add roundtrip testing and bump format versionRune Tynan-1/+1
2021-03-06Remove Item::kind, use tagged enum. Rename variants to matchRune Tynan-5/+4
2021-03-05Don't unnecessarily clone some fields in `Context`Camelid-0/+4
There was no need to clone `id_map` because it was reset before each item was rendered. `deref_id_map` was not reset, but it was keyed by `DefId` and thus was unlikely to have collisions (at least for now). Now we just clone the fields that need to be cloned, and instead create fresh versions of the others.
2021-03-05Make ItemKind::ExternCrate looks like hir::ItemKind::ExternCrate to make ↵Guillaume Gomez-1/+1
transition over hir::ItemKind simpler
2021-03-01Remove `krate.version`; fix `crate_version` in JSONJoshua Nelson-2/+2
Previously, `JsonRenderer::after_krate` called `krate.version.clone()`. The problem was it did that after the version was already moved into the cache, so it would always be None. The fix was to get the version from the cache instead.
2021-03-01Remove the dummy cache in `DocContext`Joshua Nelson-2/+1
The same information is available everywhere; the only reason the dummy cache was needed is because it waas previously stored in three different places. This consolidates the info a bit so the cache in `DocContext` is used throughout. As a bonus, it means `renderinfo` is used much much less. - Return a `Cache` from `run_global_ctxt`, not `RenderInfo` - Remove the unused `render_info` from `run_renderer` - Remove RefCell around `inlined` - Add intra-doc links
2021-02-23Put clean::Trait extra information into a new struct to make it more coherentGuillaume Gomez-1/+2
2021-02-23Remove is_spotlight field from `Trait`Guillaume Gomez-1/+1
2021-02-16Make `Clean` take &mut DocContextJoshua Nelson-2/+2
- Take `FnMut` in `rustc_trait_selection::find_auto_trait_generics` - Take `&mut DocContext` in most of `clean` - Collect the iterator in auto_trait_impls instead of iterating lazily; the lifetimes were really bad. - Changes `fn sess` to properly return a borrow with the lifetime of `'tcx`, not the mutable borrow.
2021-02-08Make `header` a vec of modifiers, make FunctionPointer consistent with ↵Rune Tynan-1/+1
Function and Method.
2021-01-28Remove struct_type from union output and bump formatRune Tynan-1/+1
2021-01-27Update crate name and add READMERune Tynan-1/+1
2021-01-27Simplify conversionRune Tynan-8/+1
2021-01-27Allow rustc::default_hash_types in the offending statementRune Tynan-0/+3
2021-01-27Split JSON into separately versioned crateRune Tynan-8/+17
2021-01-27More cleanupGuillaume Gomez-6/+3
2021-01-27Update to new rustdoc APIsGuillaume Gomez-1/+1
2021-01-27Remove CACHE_KEY globalGuillaume Gomez-40/+40
2021-01-23Rollup merge of #81275 - jyn514:time-render, r=wesleywiserJonas Schievink-0/+4
Fix <unknown> queries and add more timing info to render_html Closes https://github.com/rust-lang/rust/issues/81251. ## Fix `<unknown>` queries This happened because `alloc_query_strings` was never called. ## Add more timing info to render_html This still has some issues I'm not sure how to work out: - `create_renderer` and `renderer_after_krate` aren't shown by default. I want something like `verbose_generic_activity_with_arg`, but it doesn't exist. I'm also not sure how to show activities that aren't on by default - I tried `-Z self-profile -Z self-profile-args=all`, but it didn't show up. r? `@wesleywiser`
2021-01-23Add more timing info to render_htmlJoshua Nelson-0/+4
- Show `create_renderer` and `renderer_after_crate` by default - Don't rewrite `extra_verbose_generic_activity`