about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2024-08-16Simplify cleaning foreign fns in rustdocMichael Goulet-10/+4
2024-08-15rustdoc-json: Use FxHashMap from rustdoc_json_typesAlona Enraght-Moony-5/+5
2024-08-15Rollup merge of #128963 - GuillaumeGomez:output-to-stdout, r=aDotInTheVoidMatthias Krüger-21/+41
Add possibility to generate rustdoc JSON output to stdout Fixes #127165. I think it's likely common to want to get rustdoc json output directly instead of reading it from a file so I added this option to allow it. It's unstable and only works with `--output-format=json`. r? `@aDotInTheVoid`
2024-08-14Auto merge of #129060 - matthiaskrgr:rollup-s72gpif, r=matthiaskrgrbors-3/+5
Rollup of 7 pull requests Successful merges: - #122884 (Optimize integer `pow` by removing the exit branch) - #127857 (Allow to customize `// TODO:` comment for deprecated safe autofix) - #129034 (Add `#[must_use]` attribute to `Coroutine` trait) - #129049 (compiletest: Don't panic on unknown JSON-like output lines) - #129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML) - #129056 (Fix one usage of target triple in bootstrap) - #129058 (Add mw back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-14Auto merge of #128812 - nnethercote:shrink-TyKind-FnPtr, r=compiler-errorsbors-2/+2
Shrink `TyKind::FnPtr`. By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and `FnHeader`, which can be packed more efficiently. This reduces the size of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms. This reduces peak memory usage by a few percent on some benchmarks. It also reduces cache misses and page faults similarly, though this doesn't translate to clear cycles or wall-time improvements on CI. r? `@compiler-errors`
2024-08-13Rollup merge of #129050 - ↵Matthias Krüger-3/+5
GuillaumeGomez:generate-link-to-definition-warning, r=notriddle Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML Fixes https://github.com/rust-lang/docs.rs/issues/2581. It's a bit weird to emit an error in this case anyway, a warning is more than enough. r? ``@notriddle``
2024-08-13Fix intra-doc linkGuillaume Gomez-3/+2
2024-08-13Run fmtGuillaume Gomez-6/+7
2024-08-13Improve documentation for internal doctest APIGuillaume Gomez-0/+13
2024-08-13Move `is_multiple_tests` argument into `RunnableDocTest`Guillaume Gomez-20/+12
2024-08-13Unify naming of `DocTest`Guillaume Gomez-42/+46
2024-08-13Don't special-case if there is only one merged doctestGuillaume Gomez-28/+24
2024-08-13Remove need for `unsafe` code in merged doctestsGuillaume Gomez-5/+10
2024-08-13Improve code readabilityGuillaume Gomez-5/+19
2024-08-13If there are crate attributes, we prevent doctest to be merged with othersGuillaume Gomez-27/+4
2024-08-13Rename `DocTest` into `DocTestBuilder`Guillaume Gomez-17/+22
2024-08-13Reduce merged doctest source code sizeGuillaume Gomez-25/+7
2024-08-13Run mergeable doctest as part of standalone doctests if there is only oneGuillaume Gomez-37/+40
2024-08-13Add documentation on `DocTest` and `RunnableDoctest` structsGuillaume Gomez-0/+3
2024-08-13Improve code by removing unneeded function argumentsGuillaume Gomez-24/+9
2024-08-13Correctly handle macros using `$crate` in merged doctestsGuillaume Gomez-3/+14
2024-08-13Disable merged doctests by defaultGuillaume Gomez-1/+1
2024-08-13Only show rustdoc doctest compilation output if `nocapture` is usedGuillaume Gomez-3/+5
2024-08-13If no argument is provided to merged doctests binary, they will be run in ↵Guillaume Gomez-6/+4
the same process (needed for miri)
2024-08-13Correctly handle `internal_features` attributeGuillaume Gomez-1/+13
2024-08-13Don't change indent in merged doctestsGuillaume Gomez-1/+1
2024-08-13Make merged doctests run in their own processGuillaume Gomez-17/+87
2024-08-13Fix weird memory allocation failure in merged doctests by storing doctest ↵Guillaume Gomez-8/+8
list into a const
2024-08-13Don't merge doctests with `#[global_allocator]`Guillaume Gomez-75/+70
2024-08-13Greatly improve handling of doctests attributes, making it possible to merge ↵Guillaume Gomez-52/+116
doctests more efficiently
2024-08-13Simplify `has_main_fn` to be a boolean instead of a `Option<Span>`Guillaume Gomez-31/+37
2024-08-13Correctly handle doctests with invalid ASTGuillaume Gomez-9/+27
2024-08-13Correctly handle the case where there is no doctests to runGuillaume Gomez-1/+5
2024-08-13If there is any AST error with a doctest, we make it a standalone testGuillaume Gomez-88/+183
To do so, AST error detection was improved in order to not filter out too many doctests.
2024-08-13Prevent merged doctests to break stdin if the generated file is too bigGuillaume Gomez-17/+50
2024-08-13Add new doc codeblock `standalone` attributeGuillaume Gomez-0/+7
2024-08-13Only merge doctests starting 2024 editionGuillaume Gomez-1/+5
2024-08-13Split doctests into two categories: mergeable ones and standalone onesGuillaume Gomez-62/+99
2024-08-13Split standalone and mergeable doctestsGuillaume Gomez-154/+440
2024-08-13Split doctests between standalone and mergeable onesGuillaume Gomez-29/+61
2024-08-13Simplify doctest testsGuillaume Gomez-27/+24
2024-08-13Add `DocTest` typeGuillaume Gomez-138/+190
2024-08-13Clean up rustdoc make_test function codeGuillaume Gomez-21/+21
2024-08-13Emit a warning instead of an error if `--generate-link-to-definition` is ↵Guillaume Gomez-3/+5
used with other output formats than HTML
2024-08-12Rollup merge of #128394 - GuillaumeGomez:run-button, r=t-rustdocGuillaume Gomez-44/+29
Unify run button display with "copy code" button and with mdbook buttons Follow-up of https://github.com/rust-lang/rust/pull/128339. It looks like this (coherency++, yeay!): ![Screenshot from 2024-07-30 15-16-31](https://github.com/user-attachments/assets/5e262e5b-f338-4085-94ca-e223033a43db) Can be tested [here](https://rustdoc.crud.net/imperio/run-button/foo/struct.Bar.html). r? `@notriddle`
2024-08-12Add possibility to generate rustdoc JSON output to stdoutGuillaume Gomez-21/+41
2024-08-10Rollup merge of #128923 - GuillaumeGomez:negative-impls-items, r=fmeaseGuillaume Gomez-19/+27
[rustdoc] Stop showing impl items for negative impls Fixes https://github.com/rust-lang/rust/issues/128799. As discussed with `@fmease,` they have a broader patch in progress, so this (small) PR will at least allow for them to have a regression test. :) r? `@fmease`
2024-08-10Stop showing impl items for negative implsGuillaume Gomez-19/+27
2024-08-09Rollup merge of #128838 - notriddle:notriddle/invalid-tag-is-not-rust, ↵Matthias Krüger-7/+19
r=GuillaumeGomez rustdoc: do not run doctests with invalid langstrings https://github.com/rust-lang/rust/pull/124577#issuecomment-2276034737 CC ``@decathorpe``
2024-08-09Shrink `TyKind::FnPtr`.Nicholas Nethercote-2/+2
By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and `FnHeader`, which can be packed more efficiently. This reduces the size of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms. This reduces peak memory usage by a few percent on some benchmarks. It also reduces cache misses and page faults similarly, though this doesn't translate to clear cycles or wall-time improvements on CI.