summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2022-08-08Add regression test commentNoah Lev-0/+2
2022-08-08Synthetize a trait ref when none is available.Camille GILLOT-1/+3
2022-08-08Avoid ICE in rustdoc.Camille GILLOT-0/+17
2022-08-08rustdoc: do not mark the contents of a skipped module as inlinedMichael Howell-0/+27
2022-08-05fixup rustdoc testMark Rousskov-2/+2
2022-08-05rustdoc: avoid inlining foreigns with duplicate namesMichael Howell-0/+20
2022-08-05rustdoc: avoid inlining modules with duplicate namesMichael Howell-0/+21
Fixes rust-lang/rust#99734
2022-07-21Rollup merge of #99344 - ↵Dylan DPC-0/+70
notriddle:notriddle/multiple-macro-rules-w-same-name, r=GuillaumeGomez rustdoc: avoid inlining items with duplicate `(type, name)` Fixes #99221
2022-07-09rustdoc: filter '_ lifetimes from ty::PolyTraitRefMichael Howell-0/+22
Fixes #98697
2022-06-20Add test for macro support in "jump to def" featureGuillaume Gomez-0/+25
2022-06-19Rollup merge of #98105 - notriddle:notriddle/tuple-links, r=jshaDylan DPC-0/+18
rustdoc: remove tuple link on round braces This is #98069 but for tuples. The reasoning is the same: * This PR also changes it so that tuples with all-generic elements still link to the primitive.tuple.html page, just like slices. So there still plenty of on-ramps for anybody who doesn't know about it. * It's too hard to see when round braces are a separate link from the type inside of them. * It's too hard to click even if you do notice them. Before: * impl [ToSocketAddrs](https://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html) for [(](https://doc.rust-lang.org/nightly/std/primitive.tuple.html)[IpAddr](https://doc.rust-lang.org/nightly/std/net/enum.IpAddr.html), [u16](https://doc.rust-lang.org/nightly/std/primitive.u16.html)[)](https://doc.rust-lang.org/nightly/std/primitive.tuple.html) * impl<K, V> [FromIterator](https://notriddle.com/notriddle-rustdoc-test/std/iter/trait.FromIterator.html)<[(](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)K, V[)](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)> for [BTreeMap](https://notriddle.com/notriddle-rustdoc-test/std/collections/struct.BTreeMap.html)<K, V> After: * impl [ToSocketAddrs](https://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html) for ([IpAddr](https://doc.rust-lang.org/nightly/std/net/enum.IpAddr.html), [u16](https://doc.rust-lang.org/nightly/std/primitive.u16.html)) * impl<K, V> [FromIterator](https://notriddle.com/notriddle-rustdoc-test/std/iter/trait.FromIterator.html)<[(K, V)](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)> for [BTreeMap](https://notriddle.com/notriddle-rustdoc-test/std/collections/struct.BTreeMap.html)<K, V>
2022-06-18Add test cases for tuples with linksMichael Howell-0/+18
2022-06-16Auto merge of #97842 - notriddle:notriddle/tuple-docs, r=jsha,GuillaumeGomezbors-0/+54
Improve the tuple and unit trait docs * Reduce duplicate impls; show only the `(T,)` and include a sentence saying that there exists ones up to twelve of them. * Show `Copy` and `Clone`. * Show auto traits like `Send` and `Sync`, and blanket impls like `Any`. Here's the new version: * <https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html> * <https://notriddle.com/notriddle-rustdoc-test/std/primitive.unit.html>
2022-06-16Exclude cfg "doc" and "doctest" from feature `doc_auto_cfg`Sprite-10/+15
2022-06-16Fix `cfg(not)` and `cfg(all)` causing Rustdoc stab to disappearSprite-1/+17
2022-06-14rustdoc: add test case for "variadic tuple" search notationMichael Howell-0/+18
2022-06-13rustdoc: remove link on slice bracketsMichael Howell-3/+3
Since #97668 was merged, the slice::get function now looks like this: ![image](https://user-images.githubusercontent.com/1593513/173430685-1dd2b275-2439-4392-b7d4-96bcb355a377.png) That whole thing, `[T]`, is a single link to `primitive.slice.html`. This definitely fixes it for this case, but it's not obvious what we should do for slices of concrete types: ![image](https://user-images.githubusercontent.com/1593513/173430968-7eed1aec-b688-4f84-a492-9210aff0037a.png) There are actually three links in that `[u8]`: the opening brace `[` is a link to `primitive.slice.html`, the `u8` is a link to `primitive.u8.html`, and the final `]` is a link to `primitive.slice.html`. This is a serious [usability bug](https://usability.yale.edu/web-accessibility/articles/links): the square braces are much too small for anyone who doesn't have perfect motor control using mouse or touch, provide an excessive number of tab stops for anyone using keyboard, and no visual indication whatsoever that they're separate links. Now that slices of generic types are linked, it seems reasonable to err on the side of less clutter and stop linking concrete slices to the slice page.
2022-06-11Add test case for #trait-implementations-1 linkMichael Howell-0/+8
2022-06-08Add regression test for #84634Guillaume Gomez-0/+28
2022-06-07rustdoc: show auto/blanket docs for tuple and unitMichael Howell-0/+28
2022-06-06Rollup merge of #90905 - GuillaumeGomez:empty-impl-blocks, r=jshaMatthias Krüger-0/+20
Add empty impl blocks if they have documentation Fixes https://github.com/rust-lang/rust/issues/90866. The update for the test script is needed to count the number of impl blocks we have with only the struct. To be noted that with https://github.com/rust-lang/rust/pull/89676 merged, it wouldn't be needed (I don't know what is the status of it btw. cc ```@Mark-Simulacrum).``` It looks like this: ![Screenshot from 2021-11-14 16-51-28](https://user-images.githubusercontent.com/3050060/141689100-e57123c0-bf50-4c42-adf5-d991e169a0e4.png) cc ```@jyn514``` r? ```@camelid```
2022-06-03Rollup merge of #97668 - notriddle:notriddle/slice-link, r=jshaDylan DPC-0/+32
rustdoc: clean up primitive.slice.html links Before: <a href="https://doc.rust-lang.org/stable/std/boxed/struct.Box.html">Box</a>&lt;<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">[</a>T<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">]</a>&gt; After: <a href="https://doc.rust-lang.org/stable/std/boxed/struct.Box.html">Box</a>&lt;<a href="https://doc.rust-lang.org/stable/std/primitive.slice.html">[T]</a>&gt;
2022-06-02rustdoc: clean up primitive.slice.html linksMichael Howell-0/+32
2022-06-02Rollup merge of #97502 - onlineSoftwareDevOK:rustdocTests, r=GuillaumeGomezMatthias Krüger-0/+42
rustdoc: Add more test coverage Related issue https://github.com/rust-lang/rust/issues/91113
2022-06-02rustdoc: Add more test coverageonlinesoftwaredevok@protonmail.com-0/+42
2022-06-02Rollup merge of #97617 - GuillaumeGomez:rustdoc-anonymous-reexports, r=Nemo157Dylan DPC-0/+22
Rustdoc anonymous reexports Fixes #97615. r? `@Nemo157`
2022-06-01Add test for anonymous reexportsGuillaume Gomez-0/+22
2022-06-02Rollup merge of #97613 - jsha:implementation-is-on-local-type, r=GuillaumeGomezYuki Okushi-1/+1
rustdoc: Improve calculation of "Impls on Foreign Types" The existing code to calculate whether an implementation was on a "Foreign Type" was duplicated across the sidebar generation and the page generation. It also came to the wrong conclusion for some cases where both the trait and the "for" type were re-exports. This PR extracts the logic into a method of `Impl`, breaks it into a multi-line method so it can be commented, and adds a case for when the trait and the "for" type came from the same crate. This fixes some cases - like the platform-specific integer types (`__m256`, `__m128`, etc). But it doesn't fix all cases. See the screenshots below. [Before](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html#foreign-impls): <img src="https://user-images.githubusercontent.com/220205/171338226-59ce6daf-3d76-4bad-bc8d-72a8259a8f43.png" width=200> [After](https://rustdoc.crud.net/jsha/implementation-is-on-local-type/std/clone/trait.Clone.html): <img src="https://user-images.githubusercontent.com/220205/171338147-28308a65-1597-4223-be47-9550062404dd.png" width=200> The remaining types (`CString`, `NulError`, etc) are all from the `alloc` crate, while the `Clone` trait is from the `core` crate. Since `CString` and `Clone` are both re-exported by `std`, they are logically local to each other, but I couldn't figure out a good way to detect that in this code. I figure this is still a good step forward. Related: #97610 r? `@camelid`
2022-06-02Rollup merge of #97130 - notriddle:notriddle/collect-trait-impls-dup, ↵Yuki Okushi-0/+14
r=GuillaumeGomez rustdoc: avoid including impl blocks with filled-in generics Fixes #94937 # Before ![image](https://user-images.githubusercontent.com/1593513/168933282-02ccc4ae-9c89-4836-ba34-e2bd83946105.png) # After ![image](https://user-images.githubusercontent.com/1593513/168933255-4c17407d-d8d1-406e-87f5-9ea809437173.png)
2022-06-01rustdoc: add test case for auto traits on slice primitiveMichael Howell-0/+14
2022-06-01Improve calculation of "Impls on Foreign Types"Jacob Hoffman-Andrews-1/+1
2022-06-01Rollup merge of #97470 - notriddle:notriddle/test-cases, r=GuillaumeGomezYuki Okushi-2/+47
rustdoc: add more test coverage https://github.com/rust-lang/rust/issues/91113
2022-05-31Add test for empty impl blocksGuillaume Gomez-0/+20
2022-05-30Remove `#[default..]` and add `#[const_trait]`Deadbeef-1/+1
2022-05-27rustdoc: add test case for the implementors JS file placementMichael Howell-0/+43
2022-05-27rustdoc: add test case for email that looks like intra-doc linkMichael Howell-2/+4
2022-05-21Strenghten strip-enum-variant.rs testGuillaume Gomez-0/+3
2022-05-21Remove `crate` visibility modifier in libs, testsJacob Pratt-3/+1
2022-05-20Rollup merge of #96565 - notriddle:notriddle/impl-box, r=camelidGuillaume Gomez-0/+16
rustdoc: show implementations on `#[fundamental]` wrappers Fixes #92940
2022-05-09Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errorsbors-26/+23
Remove `#[rustc_deprecated]` This removes `#[rustc_deprecated]` and introduces diagnostics to help users to the right direction (that being `#[deprecated]`). All uses of `#[rustc_deprecated]` have been converted. CI is expected to fail initially; this requires #95958, which includes converting `stdarch`. I plan on following up in a short while (maybe a bootstrap cycle?) removing the diagnostics, as they're only intended to be short-term.
2022-05-07Rollup merge of #96636 - GuillaumeGomez:fix-jump-to-def-regression, r=notriddleGuillaume Gomez-0/+18
Fix jump to def regression https://github.com/rust-lang/rust/pull/93803 introduced a regression in the "jump to def" feature. This fixes it. Nice side-effect: it adds a new regression test. :) I also used this opportunity to add documentation about this unstable feature in the rustdoc book. cc ``@cjgillot`` r? ``@notriddle``
2022-05-06Add regression test for jump-to-defGuillaume Gomez-0/+18
2022-05-05Fix test case checking for where the JS goesMichael Howell-1/+1
2022-04-29Rollup merge of #96536 - rust-lang:notriddle/deref-slice-core, r=GuillaumeGomezDylan DPC-0/+22
rustdoc: fix missing method list for primitive deref target This change makes it so that local impls count when listing primitives that need retained. Fixes #95325
2022-04-29rustdoc: show implementations on `#[fundamental]` wrappersMichael Howell-0/+16
Fixes #92940
2022-04-28rustdoc: fix missing method list for primitive deref targetMichael Howell-0/+22
This change makes it so that local impls count when listing primitives that need retained.
2022-04-27Rollup merge of #96410 - notriddle:notriddle/issue-95873, r=GuillaumeGomezDylan DPC-0/+2
rustdoc: do not write `{{root}}` in `pub use ::foo` docs Fixes #95873
2022-04-26Update src/test/rustdoc/issue-95873.rsMichael Howell-1/+1
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-04-25rustdoc: do not write `{{root}}` in `pub use ::foo` docsMichael Howell-0/+2
2022-04-25Fix issue 96381Michael Goulet-0/+16