about summary refs log tree commit diff
path: root/tests/rustdoc/auxiliary
AgeCommit message (Collapse)AuthorLines
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