about summary refs log tree commit diff
path: root/src/librustdoc/visit_ast.rs
AgeCommit message (Collapse)AuthorLines
2023-12-18Rename `Session::span_diagnostic` as `Session::dcx`.Nicholas Nethercote-1/+1
2023-12-15NFC don't convert types to identical typesMatthias Krüger-4/+5
2023-12-12Move some methods from `tcx.hir()` to `tcx`zetanumbers-1/+1
Renamings: - find -> opt_hir_node - get -> hir_node - find_by_def_id -> opt_hir_node_by_def_id - get_by_def_id -> hir_node_by_def_id Fix rebase changes using removed methods Use `tcx.hir_node_by_def_id()` whenever possible in compiler Fix clippy errors Fix compiler Apply suggestions from code review Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> Add FIXME for `tcx.hir()` returned type about its removal Simplify with with `tcx.hir_node_by_def_id`
2023-11-26rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` ↵Vadim Petrochenkov-3/+2
cleanup
2023-11-15Re-format code with new rustfmtMark Rousskov-6/+8
2023-08-16Improve code readability by moving fmt args directly into the stringGuillaume Gomez-3/+3
2023-07-29Move `inherits_doc_hidden` and `should_ignore_res` into `clean/utils.rs`Guillaume Gomez-32/+1
2023-07-29Move Res check into `should_ignore_res`Guillaume Gomez-1/+6
2023-07-24Fix missing attribute merge on glob foreign re-exportsGuillaume Gomez-2/+2
2023-07-18Remove unneeded `Option<Symbol>` in `foreign_items`Guillaume Gomez-3/+2
2023-07-18Fix invalid display of inlined re-exportGuillaume Gomez-14/+26
2023-07-14Correctly handle `--document-hidden-items`Guillaume Gomez-3/+7
2023-06-20Fix invalid creation of files in rustdocGuillaume Gomez-2/+5
2023-06-06rustdoc: convert `if let Some()` that always matches to variableMichael Howell-18/+28
2023-06-05fix spelling errorLuca Scherzer-3/+3
2023-06-01Fix bug where private item with intermediate doc hidden re-export was not ↵Guillaume Gomez-1/+2
inlined
2023-05-30Fix re-export of doc hidden item inside private item not displayedGuillaume Gomez-25/+32
2023-05-27Rollup merge of #112018 - GuillaumeGomez:cleanup-tcx, r=notriddleMatthias Krüger-7/+6
Clean up usage of `cx.tcx` when `tcx` is already set into a variable I discovered a few cases where `cx.tcx` (and equivalents) was used whereas `tcx` was already stored into a variable. In those cases, better to just use `tcx` directly. r? `@notriddle`
2023-05-27Clean up usage of `cx.tcx` when `tcx` is already set into a variableGuillaume Gomez-7/+6
2023-05-27Correctly handle multiple re-exports of bang macros at the same levelGuillaume Gomez-3/+9
2023-05-26Fix re-export of doc hidden macro not showing upGuillaume Gomez-0/+10
2023-05-16Only keep impl blocks from bodiesGuillaume Gomez-1/+29
2023-05-12Require `impl Trait` in associated types to appear in method signaturesOli Scherer-1/+2
2023-05-10Rollup merge of #111095 - GuillaumeGomez:fix-assoc-item-trait-inside-hidden, ↵Matthias Krüger-15/+36
r=notriddle Correctly handle associated items of a trait inside a `#[doc(hidden)]` item Fixes https://github.com/rust-lang/rust/issues/111064. cc `@compiler-errors` r? `@notriddle`
2023-05-05Modules can be reexported and it should be handled by rustdocGuillaume Gomez-7/+33
2023-05-05Correctly handle associated items of a trait inside a `#[doc(hidden)]` itemGuillaume Gomez-8/+3
2023-05-02resolve: One more attempt to simplify `module_children`Vadim Petrochenkov-4/+5
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-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-12resolve: Pre-compute non-reexport module childrenVadim Petrochenkov-1/+1
Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-08rustc_middle: Remove `Option` from `module_reexports` queryVadim Petrochenkov-1/+1
2023-04-08rustdoc: Migrate some logic to `module_reexports`Vadim Petrochenkov-7/+5
2023-04-04Don't collect return-position impl traits for documentationMichael Goulet-1/+9
2023-03-17Only add into `view_item_stack` if the item will be inlinedGuillaume Gomez-4/+4
2023-03-10Rollup merge of #108936 - GuillaumeGomez:rustdoc-anonymous-reexport, r=notriddleMatthias Krüger-2/+7
Rustdoc: don't hide anonymous reexport Fixes https://github.com/rust-lang/rust/issues/108931. From https://github.com/rust-lang/rust/issues/108931, it appears that having anonymous re-exports for traits is actually used in some places, so instead of hiding them automatically, we should prevent them to be ever inlined. r? `@notriddle`
2023-03-09Don't hide anonymous re-exports but never inline themGuillaume Gomez-2/+7
2023-03-07Fix invalid inlining of reexport of reexport of private itemGuillaume Gomez-1/+19
2023-03-02rustc_middle: Remove trait `DefIdTree`Vadim Petrochenkov-1/+1
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-02-22Prevent duplicated importsGuillaume Gomez-6/+14
2023-02-10Correctly handle reexports for macrosGuillaume Gomez-1/+1
2023-01-27Special-case handling of impl blocksGuillaume Gomez-4/+14
2023-01-27Fix handling of items inside a `doc(hidden)` blockGuillaume Gomez-10/+6
2023-01-27Improve codeGuillaume Gomez-93/+90
2023-01-27Speed up execution a bit by removing some walksGuillaume Gomez-1/+21
2023-01-27Improve code readabilityGuillaume Gomez-14/+22
2023-01-27Fix missing const expression items visitGuillaume Gomez-129/+170
2023-01-26rustdoc: Stop using `HirId`sVadim Petrochenkov-37/+45
Use `LocalDefId`s instead
2023-01-22rustdoc: Use `DefId(Map,Set)` instead of `FxHash(Map,Set)`Vadim Petrochenkov-8/+7
Not all uses are converted, a few cases iterating through maps/sets and requiring nontrivial changes are kept.
2023-01-19Revert "Fix missing const expression items visit"Guillaume Gomez-158/+115
This reverts commit cdfc5051b1286938f56160243c28538f79dce6b1.