about summary refs log tree commit diff
path: root/src/librustdoc/visit.rs
AgeCommit message (Collapse)AuthorLines
2025-08-28Add new `doc(attribute = "...")` attributeGuillaume Gomez-1/+2
2024-12-19Rename TyMethodItem -> RequiredMethodItemDavid Tolnay-1/+1
2024-12-19Rename TyAssocTypeItem -> RequiredAssocTypeItemDavid Tolnay-1/+1
2024-12-19Split AssocConstItem into ProvidedAssocConstItem and ImplAssocConstItemDavid Tolnay-1/+2
2024-12-19Rename TyAssocConstItem -> RequiredAssocConstItemDavid Tolnay-1/+1
2024-11-28Fix new clippy lintsGuillaume Gomez-1/+1
2024-09-28rustdoc: add doc comment to DocVisitorbinarycat-2/+9
2024-09-25rm higher-ranked lifetimes from `DocVisitor`Lukas Markeffsky-6/+6
This allows the visitor to borrow from the visitees.
2024-09-25de-rc external traitsLukas Markeffsky-5/+2
Don't keep the `external_traits` as shared mutable data between the `DocContext` and `clean::Crate`. Instead, move the data over when necessary. This allows us to get rid of a borrowck hack in the `DocVisitor`.
2024-09-07rustdoc: use a single box to store Attributes and ItemKindMichael Howell-2/+2
2024-08-01rustdoc: Remove OpaqueTyAlona Enraght-Moony-1/+0
2024-07-27rustdoc: use strategic ThinVec/Box to shrink `clean::ItemKind`Michael Howell-1/+1
2024-06-20Implement `unsafe_extern_blocks` feature in rustdocGuillaume Gomez-2/+2
2024-06-05Remove `Type` from rustdoc `Const`Boxy-1/+1
2023-08-21rustdoc: Rename `clean` items from typedef to type aliasNoah Lev-1/+1
2023-01-01clean: Always store enum disriminant.Nixon Enraght-Moony-4/+4
2022-09-27rustdoc: remove `clean::TraitWithExtraInfo`Michael Howell-1/+1
Instead, it gathers the extra info later, when it's actually requested.
2022-09-03Rustdoc-Json: Add enum discriminantNixon Enraght-Moony-1/+1
2022-07-21Remove unused field in ItemKind::KeywordItemGuillaume Gomez-1/+1
2022-05-24fix simple clippy lintsklensy-1/+0
2022-05-21Remove `crate` visibility modifier in libs, testsJacob Pratt-1/+1
2022-04-12rustdoc: discr. required+provided assoc consts+tysLeón Orell Valerian Liehr-2/+4
2022-02-27make GATs print properly in traitsMichael Goulet-1/+1
2021-11-01List all cases explicitly in `Doc{Folder,Visitor}`Noah Lev-2/+20
2021-10-31Fix `RefCell` `BorrowMut` error in `DocVisitor`Noah Lev-3/+5
Until `external_traits` is cleaned up (i.e., no longer behind a `RefCell`), `DocVisitor` will have to `take` `external_traits` -- just like `DocFolder` -- to prevent `RefCell` runtime errors.
2021-10-31rustdoc: Add `DocVisitor`Noah Lev-0/+51
`DocFolder` allows transforming the docs, accomplished by making its methods take and return types by-value. However, several of the rustdoc `DocFolder` impls only *visit* the docs; they don't change anything. Passing around types by-value is thus unnecessary, confusing, and potentially inefficient for those impls. `DocVisitor` is very similar to `DocFolder`, except that its methods take shared references and return nothing (i.e., the unit type). This should both be more efficient and make the code clearer. There is an additional reason to add `DocVisitor`, too. As part of my cleanup of `external_traits`, I'm planning to add a `fn cache(&mut self) -> &mut Cache` method to `DocFolder` so that `external_traits` can be retrieved explicitly from the `Cache`, rather than implicitly via `Crate.external_traits` (which is an `Rc<RefCell<...>>`). However, some of the `DocFolder` impls that could be turned into `DocVisitor` impls only have a shared reference to the `Cache`, because they are used during rendering. (They have to access the `Cache` via `html::render::Context.shared.cache`, which involves an `Rc`.) Since `DocVisitor` does not mutate any of the types it's visiting, its equivalent `cache()` method will only need a shared reference to the `Cache`, avoiding the problem described above.