about summary refs log tree commit diff
path: root/src/librustdoc/html/highlight.rs
AgeCommit message (Collapse)AuthorLines
2025-09-30Replace `rustc_span::Span` with a stripped down version for librustdoc's ↵Yotam Ofek-1/+2
highlighter
2025-09-25Rollup merge of #146933 - yotamofek:pr/rustdoc/highlight_no_write_str, ↵Matthias Krüger-74/+56
r=GuillaumeGomez Make `render_example_with_highlighting` return an `impl fmt::Display` Removes some more usages of `write_str`. Shouldn't affect runtime, but makes the codebase a bit more consistent. Each commit can be reviewed separately
2025-09-25Rollup merge of #135771 - GuillaumeGomez:jump-to-def-perf, r=fmeaseMatthias Krüger-46/+74
[rustdoc] Add support for associated items in "jump to def" feature Fixes https://github.com/rust-lang/rust/issues/135485. r? ``@fmease``
2025-09-23Remove unused param from `write_header`Yotam Ofek-11/+2
2025-09-23Remove `Tooltip::None` variant, use `Option::None`Yotam Ofek-12/+11
2025-09-23Make `render_example_with_highlighting` return an `impl fmt::Display`Yotam Ofek-62/+54
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-08-10Better handling of paths in link to def featureGuillaume Gomez-46/+74
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