about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2024-07-03rustdoc-json: Better representation of lifetime bounds in where clauses.Alona Enraght-Moony-3/+10
As suggested [on zulip][1], there's no need to use `GenericBound` here, as the only bound a lifetime can have is that it outlives other lifetimes. While we're making breaking changes here, I also renamed it from using "region" to "lifetime", as this is more user-aligned. See [this comment][2] for details. [1]: https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/.60ItemEnum.3A.3AOpaqueTy.60/near/448871430 [2]: https://github.com/rust-lang/rust/issues/100961#issuecomment-2206565556
2024-07-02Rollup merge of #127146 - compiler-errors:fast-reject, r=lcnrMatthias Krüger-2/+1
Uplift fast rejection to new solver Self explanatory. r? lcnr
2024-07-01rustdoc: click target for sidebar items flush leftMichael Howell-4/+12
2024-07-01rustdoc: add usable lint for pulldown-cmark-0.11 parsing changesMichael Howell-0/+164
2024-06-30rustdoc: update to pulldown-cmark 0.11Michael Howell-68/+69
2024-06-30Uplift fast rejection to new solverMichael Goulet-2/+1
2024-06-29Auto merge of #120639 - fee1-dead-contrib:new-effects-desugaring, r=oli-obkbors-16/+18
Implement new effects desugaring cc `@rust-lang/project-const-traits.` Will write down notes once I have finished. * [x] See if we want `T: Tr` to desugar into `T: Tr, T::Effects: Compat<true>` * [x] Fix ICEs on `type Assoc: ~const Tr` and `type Assoc<T: ~const Tr>` * [ ] add types and traits to minicore test * [ ] update rustc-dev-guide Fixes #119717 Fixes #123664 Fixes #124857 Fixes #126148
2024-06-29Rollup merge of #127045 - compiler-errors:explicit, r=oli-obkMatthias Krüger-1/+1
Rename `super_predicates_of` and similar queries to `explicit_*` to note that they're not elaborated Rename: * `super_predicates_of` -> `explicit_super_predicates_of` * `implied_predicates_of` -> `explicit_implied_predicates_of` * `supertraits_containing_assoc_item` -> `explicit_supertraits_containing_assoc_item` This makes it clearer that, unlike (for example) [`TyCtxt::super_traits_of`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.super_traits_of), we don't automatically elaborate this set of predicates. r? ``@lcnr`` or ``@oli-obk`` or someone from t-types idc
2024-06-28Only require symbol name for @feature_gateMichael Goulet-2/+2
2024-06-28Change RTN to use .. againMichael Goulet-1/+1
2024-06-28implement new effects desugaringDeadbeef-16/+18
2024-06-28docs: check if the disambiguator matches its suffixbohan-8/+24
2024-06-27Make queries more explicitMichael Goulet-1/+1
2024-06-22Auto merge of #126761 - GuillaumeGomez:unsafe_extern_blocks, r=spastorinobors-28/+40
rustdoc: Add support for `missing_unsafe_on_extern` feature Follow-up of https://github.com/rust-lang/rust/pull/124482. Not sure if the `safe` keyword is supposed to be displayed or not though? For now I didn't add it in the generated doc, only `unsafe` as usual. cc `@spastorino` r? `@fmease`
2024-06-20Implement `unsafe_extern_blocks` feature in rustdocGuillaume Gomez-28/+40
2024-06-20Add blank lines after module-level `//!` comments.Nicholas Nethercote-0/+8
Most modules have such a blank line, but some don't. Inserting the blank line makes it clearer that the `//!` comments are describing the entire module, rather than the `use` declaration(s) that immediately follows.
2024-06-18Use a dedicated type instead of a reference for the diagnostic contextOli Scherer-28/+30
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
2024-06-17Fix other toolsMichael Goulet-0/+2
2024-06-10Rollup merge of #126159 - RalfJung:scalarint-size-mismatch, r=oli-obkMatthias Krüger-2/+1
ScalarInt: size mismatches are a bug, do not delay the panic Cc [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Why.20are.20ScalarInt.20to.20iN.2FuN.20methods.20fallible.3F) r? ``@oli-obk``
2024-06-10ScalarInt: size mismatches are a bug, do not delay the panicRalf Jung-2/+1
2024-06-10Auto merge of #107099 - edward-shen:edward-shen/rustdoc-remap-path-prefix, ↵bors-7/+43
r=GuillaumeGomez rustdoc: Add support for --remap-path-prefix Adds `--remap-path-prefix` as an unstable option. This is implemented to mimic the behavior of `rustc`'s `--remap-path-prefix`. This flag similarly takes in two paths, a prefix to replace and a replacement string. This is useful for build tools (e.g. Buck) other than cargo that can run doc tests. cc: `@dtolnay`
2024-06-09rustdoc-search: use lowercase, non-normalized name for type searchMichael Howell-4/+8
The type name ID map has underscores in its names, so the query element should have them, too.
2024-06-09rustdoc: Add support for --remap-path-prefixEdward Shen-7/+43
Adds --remap-path-prefix as an unstable option. This is implemented to mimic the behavior of rustc's --remap-path-prefix but with minor adjustments. This flag similarly takes in two paths, a prefix to replace and a replacement string.
2024-06-08Rollup merge of #126057 - Sunshine40:rustdoc-search-non-english, r=notriddleLeón Orell Valerian Liehr-73/+88
Make html rendered by rustdoc allow searching non-English identifier / alias Fix alias search result showing `undefined` description. Inspired by https://github.com/rust-lang/mdBook/issues/2393 . Not sure if it's worth it adding full-text search functionality to rustdoc rendered html.
2024-06-07Auto merge of #126134 - matthiaskrgr:rollup-vzlegsc, r=matthiaskrgrbors-1/+5
Rollup of 11 pull requests Successful merges: - #124012 (Stabilize `binary_heap_as_slice`) - #124214 (Parse unsafe attributes) - #125572 (Detect pub structs never constructed and unused associated constants) - #125781 (prefer `compile::stream_cargo` for building tools) - #126030 (Update `./x fmt` command in library/std/src/sys/pal/windows/c/README.md) - #126047 (Simplify the rayon calls in the installer) - #126052 (More `rustc_parse` cleanups) - #126077 (Revert "Use the HIR instead of mir_keys for determining whether something will have a MIR body.") - #126089 (Stabilize Option::take_if) - #126112 (Clean up source root in run-make tests) - #126119 (Improve docs for using custom paths with `--emit`) r? `@ghost` `@rustbot` modify labels: rollup
2024-06-07run fmtGuillaume Gomez-18/+16
2024-06-07Fix broken rustdoc unit testsNoah Lev-22/+37
2024-06-07Parse full doctest source; extract helper for parsing codeNoah Lev-90/+104
It doesn't really make sense to skip part of the source when we're parsing it, so parse the whole doctest. This simplifies things too.
2024-06-07Move logic for "making" doctests to submoduleNoah Lev-375/+387
This code turns the raw code given by the user into something actually runnable, e.g. by adding a `main` function if it doesn't already exist. I also made a couple other items private that didn't need to be crate-public.
2024-06-07Make doctests before running them; reintroduce `RunnableDoctest`Noah Lev-42/+54
2024-06-07Move some arguments to fields and reorganize fieldsNoah Lev-58/+54
I moved some local arguments and options to either the local options struct or, if it made sense, the global options struct.
2024-06-07Remove `RunnableDoctest`Noah Lev-24/+17
It should instead be the actual input to the running logic. Currently it's not actually quite runnable since it's still missing some information.
2024-06-07Make two fields computed on-demandNoah Lev-9/+15
2024-06-07rustdoc: Remove `DoctestVisitor::get_line`Noah Lev-24/+42
This was used to get the line number of the first line from the current docstring, which was then used together with an offset within the docstring. It's simpler to just pass the offset to the visitor and have it do the math because it's clearer and this calculation only needs to be done in one place (the Rust doctest visitor).
2024-06-07Remove global options from `IndividualTestOptions`Noah Lev-40/+21
2024-06-07Merge `RustDoctest` and `MdDoctest` into one typeNoah Lev-77/+42
2024-06-07rustdoc: Extract actual doctest running logic into functionNoah Lev-75/+126
2024-06-07Separate doctest collection from runningNoah Lev-188/+237
2024-06-07Move Markdown-specific doctest code into submoduleNoah Lev-47/+51
2024-06-07Start moving format-specific code into doctest submoduleNoah Lev-120/+136
2024-06-07rustdoc: Use `write_all` to ensure all content is writtenNoah Lev-1/+1
2024-06-07rustdoc: Rename `Tester` to `DoctestVisitor`Noah Lev-14/+14
The new name more accurately captures what it is.
2024-06-07Update testsSunshine-2/+3
2024-06-07Follow ESLint instructions.Sunshine-4/+7
2024-06-06Fix formattingcarbotaniuman-1/+1
2024-06-06Fix buildcarbotaniuman-5/+5
2024-06-06Parse unsafe attributescarbotaniuman-1/+5
2024-06-07Other EcmaScript version bumpSunshine-1/+1
2024-06-07Bump the EcmaScript version in the eslint configuration.Sunshine-1/+1
2024-06-07TidyingSunshine-2/+4