about summary refs log tree commit diff
path: root/tests/rustdoc/auxiliary
AgeCommit message (Collapse)AuthorLines
2025-09-25rustdoc: hide `#[repr(...)]` if it isn't part of the public ABILeón Orell Valerian Liehr-0/+5
2025-05-05Created `tests/rustdoc/async` subfolder to limit number of files at the top ↵Guillaume Gomez-8/+0
level
2025-05-05Created `tests/rustdoc/extern` subfolder to limit number of files at the top ↵Guillaume Gomez-52/+0
level
2025-05-05Move primitive rustdoc tests into the `primitive` sub folderGuillaume Gomez-28/+0
2025-05-05Created `tests/rustdoc/enum` subfolder to limit number of files at the top levelGuillaume Gomez-53/+0
2025-05-05Created `tests/rustdoc/assoc` subfolder to limit number of files at the top ↵Guillaume Gomez-68/+0
level
2025-05-05Created `tests/rustdoc/impl` subfolder to limit number of files at the top levelGuillaume Gomez-143/+0
2025-05-05Created `tests/rustdoc/macro` subfolder to limit number of files at the top ↵Guillaume Gomez-49/+0
level
2025-05-05Created `tests/rustdoc/jump-to-def` subfolder to limit number of files at ↵Guillaume Gomez-6/+0
the top level
2025-05-05Created `tests/rustdoc/auto` subfolder to limit number of files at the top levelGuillaume Gomez-3/+0
2025-05-05Created `tests/rustdoc/anchors` subfolder to limit number of files at the ↵Guillaume Gomez-11/+0
top level
2025-05-05Created `tests/rustdoc/source-code-pages` subfolder to limit number of files ↵Guillaume Gomez-26/+0
at the top level
2025-05-05Created `tests/rustdoc/reexports` subfolder to limit number of files at the ↵Guillaume Gomez-105/+0
top level
2025-04-18Rollup merge of #139913 - fmease:rustdoc-fix-fn-param-handling, r=GuillaumeGomezMatthias Krüger-0/+7
rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions) **(0)** PR #136411 aimed to stop rendering unnamed params of fn ptr types as underscores in the common case (e.g., `fn(_: i32)` → `fn(i32)`) to make the rendered output stylistically more conventional. **(0.a)** However, since the cleaning fn that the PR modified is also used for lowering the HIR params of foreign fns and required assoc fns in traits, it accidentally butchered the rendering of the latter two: ```rs pub trait Trait { fn assoc_fn(_: i32); } // as well as (Rust 2015 only): fn assoc_fn(i32); unsafe extern "C" { pub fn foreign_fn(_: i32); } // Since 1.86 the fns above gets mis-rendered as: pub fn assoc_fn(: i32) // <-- BUTCHERED pub unsafe extern "C" fn foreign_fn(: i32) // <-- BUTCHERED ``` **(0.b)** Furthermore, it broke parity with middle cleaning (which includes inlined cross-crate re-exports) re-regressing parts of #44306 I once fixed in PR #103885. **(1)** Lastly, PR #139035 introduced an ICE triggered by the following input file: ```rs trait Trait { fn anon(()) {} } // internal error: entered unreachable code ``` --- This PR fixes all of these regressions and in the first commit renames several types and fns to be more ~~correct~~ descriptive and legible. ~~It also refactors `Param.name` to be of type `Option<Symbol>` instead `Symbol` (where `None` ~ `kw::Empty`), so rendering mistakes like that can no longer creep in like that (ignoring tests). CC #137978.~~ Independently done in PR #139846 a day prior.
2025-04-17rustdoc: Properly clean fn params in all contextsLeón Orell Valerian Liehr-0/+7
2025-04-17Support inlined cross-crate re-exported trait aliasesLeón Orell Valerian Liehr-3/+13
2025-04-10replace `//@ compile-flags: --edition` with `//@ edition`Pietro Albini-2/+4
2025-02-27Move "unused_exter_crate" test from rustdoc-ui to rustdocYotam Ofek-0/+17
2024-12-31Unsafe binder support in rustdocMichael Goulet-0/+4
2024-07-17Add cross-crate precise capturing support to rustdocMichael Goulet-0/+7
2024-06-24Update `tests/rustdoc` to new test syntaxGuillaume Gomez-5/+5
2024-05-21Move tests into appropriate subdirectoriesMichael Howell-34/+0
2024-05-19Add failing test for cross-crate enum in type aliasMichael Goulet-0/+5
2024-04-15rustdoc: move tests into applicable subdirectoriesMichael Howell-16/+0
2024-04-15Move ice tests to rustdoc-uiMichael Howell-17/+0
2024-02-27Add regression test for link generation on foreign macro in jump to ↵Guillaume Gomez-0/+6
defintion feature
2024-02-24Add test cases for inlining compiler-private itemsMichael Howell-0/+9
Closes #106421 This was already fixed by f5d43a052b9eb464e54af819143467954d814a24, but now the test cases are added.
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-19/+19
2024-01-03rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 5)Michael Howell-7/+0
2023-11-23rustdoc: move ICE tests to uiMichael Howell-19/+0
2023-10-16Rename `issue-\d+.rs` tests to have meaningful namesMichael Howell-10/+0
2023-10-13Stabilize AFIT and RPITITMichael Goulet-1/+0
2023-10-11Add tests for enum discriminant value display with `repr`Guillaume Gomez-0/+24
2023-10-09Auto merge of #116142 - GuillaumeGomez:enum-variant-display, r=fmeasebors-0/+24
[rustdoc] Show enum discrimant if it is a C-like variant Fixes https://github.com/rust-lang/rust/issues/101337. We currently display values for associated constant items in traits: ![image](https://github.com/rust-lang/rust/assets/3050060/03e566ec-c670-47b4-8ca2-b982baa7a0f4) And we also display constant values like [here](file:///home/imperio/rust/rust/build/x86_64-unknown-linux-gnu/doc/std/f32/consts/constant.E.html). I think that for coherency, we should display values of C-like enum variants. With this change, it looks like this: ![image](https://github.com/rust-lang/rust/assets/3050060/b53fbbe0-bdb1-4289-8537-f2dd4988e9ac) As for the display of the constant value itself, I used what we already have to keep coherency. We display the C-like variants value in the following scenario: 1. It is a C-like variant with a value set => all the time 2. It is a C-like variant without a value set: All other variants are C-like variants and at least one them has its value set. Here is the result in code: ```rust // Ax and Bx value will be displayed. enum A { Ax = 12, Bx, } // Ax and Bx value will not be displayed enum B { Ax, Bx, } // Bx value will not be displayed enum C { Ax(u32), Bx, } // Bx value will not be displayed, Cx value will be displayed. #[repr(u32)] enum D { Ax(u32), Bx, Cx = 12, } ``` r? `@notriddle`
2023-10-07Add cross-crate C-like variant testGuillaume Gomez-0/+24
2023-10-04Rename issue-\d+.rs tests to have meaningful namesMichael Howell-27/+0
2023-08-26rustdoc: handle typedef inner type when doing cross-crate inliningUrgau-0/+5
2023-07-27Auto merge of #113374 - GuillaumeGomez:private-to-public-path, ↵bors-0/+1
r=notriddle,fmease [rustdoc] If re-export is private, get the next item until a public one is found or expose the private item directly Fixes #81141. If we have: ```rust use Private as Something; pub fn foo() -> Something {} ``` Then `Something` will be replaced by `Private`. r? `@notriddle`
2023-07-26Fix regression for private in publicGuillaume Gomez-0/+1
2023-07-24Add regression test for #113982Guillaume Gomez-0/+3
2023-06-21Add rustdoc tests for `lazy_type_alias`Guillaume Gomez-0/+15
2023-04-12Split out a separate feature gate for impl trait in associated typesOli Scherer-1/+1
2023-03-30Update tests for rustc_doc_primitiveGuillaume Gomez-2/+4
2023-02-04rustdoc: trait bound formattingRoland Strasser-0/+12
rustdoc: fix item-spacer rustdoc: use proper comment style rustdoc: change formatting where clauses for traits rustdoc: remove semicolon from provided methods update provided methods formatting
2023-01-30rustdoc: remove unnecessary wrapper div.item-decl from HTMLMichael Howell-1/+1
2023-01-14rustdoc: remove redundant item kind class from `.item-decl > pre`Michael Howell-1/+1
This class originated in the very first commit of `rustdoc_ng`, and was used to add a color border around the item decl based on its kind. https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L102-L106 The item decl no longer has a border, and there aren't any kind-specific styles in modern rustdoc's rendering of this UI item. Most of this commit is updating test cases so that they use `item-decl` to find the `<pre>` tag instead of relying on the fact that the class name had `rust {kind}` in it while other `<pre>` tags only had class `rust`.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+973