diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-11-27 14:30:01 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-12-01 21:54:55 +0100 |
| commit | 5f9e71627c860058e30c0bc1f8cd4c42de5083ce (patch) | |
| tree | c751e81987f04ed1eb7ceeaef5560b3389119978 /src/librustdoc/html | |
| parent | 5fa1653c5cd175430d14c3c3d8416635772811da (diff) | |
| download | rust-5f9e71627c860058e30c0bc1f8cd4c42de5083ce.tar.gz rust-5f9e71627c860058e30c0bc1f8cd4c42de5083ce.zip | |
Add documentation for new `FormatRenderer` trait items
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 81a9cce80d1..c2d0bc915b0 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -66,6 +66,12 @@ pub(crate) struct Context<'tcx> { pub(crate) info: ContextInfo, } +/// This struct contains the information that needs to be reset between each +/// [`FormatRenderer::render_item`] call. +/// +/// When we enter a new module, we set these values for the whole module but they might be updated +/// in each child item (especially if it's a module). So to prevent these changes to impact other +/// items rendering in the same module, we need to reset them to the module's set values. #[derive(Clone, Copy)] pub(crate) struct ContextInfo { /// A flag, which when `true`, will render pages which redirect to the |
