about summary refs log tree commit diff
path: root/src/librustdoc/html/highlight.rs
AgeCommit message (Collapse)AuthorLines
2025-09-08mark `format_args_nl!` as `#[doc(hidden)]`cyrgani-1/+1
2025-08-23Improve code and add test with macro coming from another file from the same ↵Guillaume Gomez-13/+9
crate
2025-08-23Improve codeGuillaume Gomez-4/+2
2025-08-23Make macro expansion feature buttons accessibleGuillaume Gomez-2/+5
2025-08-23Do macro expansion at AST level rather than HIRGuillaume Gomez-1/+2
2025-08-23Clean up computation of macro expansion span and correctly handle spans open ↵Guillaume Gomez-17/+58
inside expansion spans
2025-08-23Correctly handle multiple macro expansions on a same lineGuillaume Gomez-14/+43
2025-08-23Add new unstable `--generate-macro-expansion` rustdoc command line flagGuillaume Gomez-9/+16
2025-08-23Add support for macro expansion in rustdoc source code pagesGuillaume Gomez-47/+175
2025-07-19Fix clippy lints in librustdocGuillaume Gomez-2/+2
2025-05-26rustdoc: refactor Tooltip rendering logicbinarycat-43/+21
2025-05-24rustdoc: use descriptive tooltip if doctest is conditionally ignoredbinarycat-8/+37
fixes https://github.com/rust-lang/rust/issues/141092
2025-05-05Implement RFC 3503: frontmattersDeadbeef-2/+4
Supercedes #137193
2025-03-07Rollup merge of #138107 - yotamofek:pr/rustdoc/clippy, r=GuillaumeGomezMatthias Krüger-4/+4
`librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in https://github.com/rust-lang/rust/pull/137320 , and [this comment](https://github.com/rust-lang/rust/pull/138090#discussion_r1983111856) r? ```@GuillaumeGomez```
2025-03-06Manual, post-`clippy --fix` cleanupsYotam Ofek-1/+1
2025-03-06`x clippy src/librustdoc --fix`Yotam Ofek-3/+3
2025-03-06`librustdoc`: flatten nested ifsYotam Ofek-42/+41
2025-02-12Nuke `Buffer` abstraction from `librustdoc` 💣Yotam Ofek-36/+44
2025-02-11Remove quotes around href in code line numbersGuillaume Gomez-1/+1
2025-02-10Move line numbers into the `<code>` directlyGuillaume Gomez-11/+101
2025-02-08Rustfmtbjorn3-17/+25
2025-01-22rustdoc: pass around decoration info by refYotam Ofek-5/+5
2024-12-12Enable "jump to def" feature on prelude variantsGuillaume Gomez-5/+10
2024-11-28Fix new clippy lintsGuillaume Gomez-3/+3
2024-11-25Fix `Result` and `Option` not getting a jump to def link generatedGuillaume Gomez-5/+8
2024-11-19Remove `TokenKind::InvalidPrefix`.Nicholas Nethercote-4/+3
It was added in #123752 to handle some cases involving emoji, but it isn't necessary because it's always treated the same as `TokenKind::InvalidIdent`. This commit removes it, which makes things a little simpler.
2024-11-13rustdoc: Treat decl macros like other itemsLeón Orell Valerian Liehr-7/+0
2024-10-08Reserve guarded string literals (RFC 3593)Peter Jaszkowiak-0/+1
2024-10-06Handle `librustdoc` cases of `rustc::potential_query_instability` lintismailarilik-2/+2
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-26/+18
2024-09-06Fix toolsMichael Goulet-1/+3
2024-07-29Reformat `use` declarations.Nicholas Nethercote-4/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-04-10Properly handle emojis as literal prefix in macrosEsteban Küber-3/+4
Do not accept the following ```rust macro_rules! lexes {($($_:tt)*) => {}} lexes!(🐛"foo"); ``` Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro expansion of literal prefixes. Fix #123696.
2024-02-27Prevent inclusion of whitespace character after macro_rules identGuillaume Gomez-0/+1
2023-12-01rustdoc: do not escape quotes in body textMichael Howell-3/+9
Escaping quote marks is only needed in attributes, not text. ```console $ du -hs doc-old/ doc-new/ 670M doc-old/ 669M doc-new/ ```
2023-11-15Re-format code with new rustfmtMark Rousskov-11/+24
2023-09-15Implement custom classes for rustdoc code blocks with ↵Guillaume Gomez-4/+21
`custom_code_classes_in_docs` feature
2023-08-16Use more named format argsGuillaume Gomez-4/+8
2023-08-16Improve code readability by moving fmt args directly into the stringGuillaume Gomez-11/+10
2023-07-13Rollup merge of #113623 - GuillaumeGomez:add-jump-to-doc, r=notriddleMatthias Krüger-0/+5
Add jump to doc I'm using the source code pages of the compiler quite a lot, but one thing missing is the possibility to jump back from the source code to the item documentation. Since I also got a few others complaining about it, I think it's fine to add it since this option is nightly only. This PR adds a link to jump back to item's documentation on the item definition (so on `Bar` in `struct Bar {... }`, as described in the unofficial [RFC](https://github.com/GuillaumeGomez/rfcs/blob/rustdoc-jump-to-definition/text/000-rustdoc-jump-to-definition.md)). r? ````@notriddle````
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-4/+2
2023-07-12Add jump to docGuillaume Gomez-0/+5
2023-05-02initial step towards implementing C string literalsDeadbeef-1/+3
2023-04-16Spelling librustdocJosh Soref-5/+5
* associated * collected * correspondence * inlining * into * javascript * multiline * variadic Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-01a couple clippy::complexity fixesMatthias Krüger-2/+2
map_identity filter_next option_as_ref_deref unnecessary_find_map redundant_slicing unnecessary_unwrap bool_comparison derivable_impls manual_flatten needless_borrowed_reference
2023-03-16Render source page layout with Askamaclubby789-38/+21
Co-authored-by: Michael Howell <michael@notriddle.com>
2023-02-15Use more let chainGuillaume Gomez-4/+2
2023-02-13Rollup merge of #107340 - notriddle:notriddle/simplify-doctest-tooltip, ↵Matthias Krüger-5/+11
r=GuillaumeGomez rustdoc: merge doctest tooltip with notable traits tooltip Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000 <details><summary>a user report where the tooltip arrow overlaps the text</summary> ![](https://cdn.discordapp.com/attachments/443150878111694848/1066420139530145812/this-example-is-not-tested-busted-rendering.png) </details> Fixes #91100 Preview: <https://notriddle.com/notriddle-rustdoc-demos/simplify-doctest-tooltip/std/vec/struct.Vec.html#indexing> Screenshot: ![image](https://user-images.githubusercontent.com/1593513/214975516-72667632-4609-49fa-8c37-e8d2ba1ba7dc.png)
2023-01-30rustdoc: remove unnecessary wrapper div.item-decl from HTMLMichael Howell-4/+4
2023-01-27rustdoc: merge doctest tooltip with notable traits tooltipMichael Howell-5/+11
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000 Fixes #91100