about summary refs log tree commit diff
path: root/src/test/rustdoc/doc-cfg.rs
AgeCommit message (Collapse)AuthorLines
2021-12-05Auto merge of #91356 - GuillaumeGomez:improve-rustdoc-layout, r=jshabors-10/+10
Improve rustdoc layout This is an overtake of https://github.com/rust-lang/rust/pull/89385 originally written by `@cynecx.` I kept the original commit and simply added the missing fixes into a new one. You can test it online [here](https://rustdoc.crud.net/imperio/improve-rustdoc-layout/std/index.html). r? `@jsha`
2021-12-02Rename ID "main" into "main-content"Guillaume Gomez-10/+10
2021-11-28Fix warnings in rustdoc HTML testsNoah Lev-1/+1
Now that compiletest denies warnings in these tests, they need fixing!
2021-06-28Add test for item-table with resize to mobileStefan Schindler-3/+3
2021-06-24Migrate from custom elements to divs with classes to be compatible with safariStefan Schindler-3/+3
2021-06-24Implement Desktop and Mobile version with gridlayoutStefan Schindler-3/+3
* implement sans-serif #85621
2021-05-03Unify rustc and rustdoc parsing of `cfg()`Joshua Nelson-0/+8
This extracts a new `parse_cfg` function that's used between both. - Treat `#[doc(cfg(x), cfg(y))]` the same as `#[doc(cfg(x)] #[doc(cfg(y))]`. Previously it would be completely ignored. - Treat `#[doc(inline, cfg(x))]` the same as `#[doc(inline)] #[doc(cfg(x))]`. Previously, the cfg would be ignored. - Pass the cfg predicate through to rustc_expand to be validated Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2021-02-28Add a test in src/test/rustdoc/doc-cfg.rsDan Gohman-0/+32
2020-12-11Auto merge of #79349 - Nemo157:issue-79201, r=jyn514bors-1/+2
Apply `doc(cfg)` from parent items while collecting trait impls Because trait impls bypass the standard `clean` hierarchy they do not participate in the `propagate_doc_cfg` pass, so instead we need to pre-collect all possible `doc(cfg)` attributes that will apply to them when cleaning. fixes #79201
2020-11-24Rename "stability" CSS class to "item-info"Guillaume Gomez-6/+6
2020-11-23Apply `doc(cfg)` from parent items while collecting trait implsWim Looman-1/+2
Because trait impls bypass the standard `clean` hierarchy they do not participate in the `propagate_doc_cfg` pass, so instead we need to pre-collect all possible `doc(cfg)` attributes that will apply to them when cleaning.
2020-10-07Simplify doc-cfg rendering based on the current contextWim Looman-4/+3
For sub-items on a page don't show cfg that has already been rendered on a parent item. At its simplest this means not showing anything that is shown in the portability message at the top of the page, but also for things like fields of an enum variant if that variant itself is cfg-gated then don't repeat those cfg on each field of the variant. This does not touch trait implementation rendering, as that is more complex and there are existing issues around how it deals with doc-cfg that need to be fixed first.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-10Remove short doc where it starts with a codeblockGuillaume Gomez-3/+3
2018-09-06Fix hover on implsGuillaume Gomez-1/+1
2018-03-21add target_feature items to doc_cfg rustdoc testQuietMisdreavus-0/+24
2017-12-30Add trailing newlines to files which have no trailing newlines.kennytm-1/+1
2017-08-10Implemented #[doc(cfg(...))].kennytm-0/+47
This attribute has two effects: 1. Items with this attribute and their children will have the "This is supported on **** only" message attached in the documentation. 2. The items' doc tests will be skipped if the configuration does not match.