about summary refs log tree commit diff
path: root/src/test/rustdoc/toggle-item-contents.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-185/+0
2022-09-19rustdoc: update test cases for changed item-decl HTMLMichael Howell-1/+1
2022-08-13rustdoc: Fix incorrect usage of `@!has` and `@!matches`Noah Lev-2/+2
`@!has` (and `@!matches`) with two arguments used to treat the second argument as a literal string of HTML code. Now, that feature has been renamed into `@!hasraw` (and `@!matchesraw`), and the arity-2 `@!has` version is an error. These uses thought the second argument was being treated as an XPath, as with the arity-3 version, but in fact was being treated as literal HTML. Because these were checking for the *absence* of the string, the tests silently did nothing -- an XPath string won't ever be showing up in the test's generated HTML!
2022-08-13Update `@!has` name in testsNoah Lev-2/+2
2022-01-09Display "private fields" instead of "fields omitted"Noah Lev-1/+1
Also: * Always use `/* */` block comments * Use the same message everywhere, rather than sometimes prefixing with "some" When I first read rustdoc docs, I was confused why the fields were being omitted. It was only later that I realized it was because they were private. It's also always bothered me that rustdoc sometimes uses `//` and sometimes uses `/*` comments for these messages, so this change makes them all use `/*`. Technically, I think fields can be omitted if they are public but `doc(hidden)` too, but `doc(hidden)` is analogous to privacy. It's really just used to emulate "doc privacy" when -- because of technical limitations -- an item has to be public. So I think it's fine to include this under the category of "private fields".
2021-10-18* Remove left margin on items declaration at the top of their documentation pageGuillaume Gomez-1/+1
* Rename "type-decl" into "item-decl" to reflect the change of usage
2021-07-26Add test for enum item tuple fields documentationGuillaume Gomez-2/+2
2021-07-22Don't hide fields of enum struct variantsNoah Lev-4/+2
* The toggle adds visual clutter * It's easy to miss that there are fields * Tuple variant fields are always shown, so it is inconsistent to hide struct variant fields * It's annoying to have to click the toggle every time
2021-07-11rustdoc: test count of item contents when hiddenWeihang Lo-7/+38
2021-05-30Remove toggle for "undocumented items."Jacob Hoffman-Andrews-0/+156
Per discussion in #84326. For trait implementations, this was misleading: the items actually do have documentation (but it comes from the trait definition). For both trait implementations and trait implementors, this was redundant: in both of those cases, the items are default-hidden by different toggle at the level above. Update tests: Remove XPath selectors that over-specified on details tag, in cases that weren't testing toggles. Add an explicit test for toggles on methods. Rename item-hide-threshold to toggle-item-contents for consistency.