Expand description
This module contains the “cleaned” pieces of the AST, and the functions that clean them.
Modules
- cfg 🔒The representation of a
#[doc(cfg(...))]attribute. - inline 🔒Support for inlining external documentation into the current AST.
- simplify 🔒Simplification of where-clauses and parameter bounds into a prettier and more canonical form.
- types 🔒
- utils 🔒
Structs
- This visitor is used to find an HIR Item based on its
usepath. This doesn’t use the ordinary name resolver because it does not walk all the way through a chain of re-exports.
Enums
Statics
- CALLSITE 🔒
- CALLSITE 🔒
- CALLSITE 🔒
- CALLSITE 🔒
- CALLSITE 🔒
- CALLSITE 🔒
- META 🔒
- META 🔒
- META 🔒
- META 🔒
- META 🔒
- META 🔒
Functions
- When inlining items, we merge its attributes (and all the reexports attributes too) with the final reexport. For example:
- This is needed to make it more “readable” when documenting functions using
rustc_legacy_const_generics. More information in https://github.com/rust-lang/rust/issues/83167. - clean_ty 🔒
- Because a
Useitem directly links to the imported item, we need to manually go through each import one by one. To do so, we go to the parent item and look for theIdentinto it. Then, if we found the “end item” (the imported one), we stop there because we don’t need its documentation. Otherwise, we repeat the same operation until we find the “end item”. - Get DefId of of an item’s user-visible parent.
- This can happen for
async fn, e.g.async fn f<'_>(&'_ self). - Synthetic type-parameters are inserted after normal ones. In order for normal parameters to be able to refer to synthetic ones, scans them first.
- Returns
Noneif the type could not be normalized