about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2021-07-21Rollup merge of #87024 - weihanglo:issue-85494, r=ManishearthEric Huss-7/+38
rustdoc: show count of item contents when hidden Resolves #85494
2021-07-17Fix test cases for header titles in sidebarMichael Howell-11/+11
2021-07-16Auto merge of #86662 - mockersf:fix-86620-link-unknown-location, r=jyn514bors-0/+22
fix dead link for method in trait of blanket impl from third party crate fix #86620 * changes `href` method to raise the actual error it had instead of an `Option` * set the href link correctly in case of an error I did not manage to make a small reproducer, I think it happens in a situation where * crate A expose a trait with a blanket impl * crate B use the trait from crate A * crate C use types from crate B * building docs for crate C without dependencies r? `@jyn514`
2021-07-15add assertions on existing tests with missing doc sourceFrançois Mockers-0/+2
2021-07-12Auto merge of #86841 - GuillaumeGomez:reexported-macro-2-render, r=Stupremeebors-0/+142
Fix rendering of reexported macros 2.0 and fix visibility of reexported items So, this PR grew a bit out of focus, it does the following things: * Fixes #86276. * Fixes visibility display for reexported items: it now takes the visibility of the "use" statement rather than the visibility of the reexported item itself). * Fixes the display of reexported items if "--document-private-items" option is used. Before, they were simply skipped. * Fixes inconsistency on typedef items: they didn't display their visibility contrary to other items. I added tests to check everything listed above. cc `@camelid` `@ollie27` (in case one of you want to review?) r? `@jyn514`
2021-07-11rustdoc: test count of item contents when hiddenWeihang Lo-7/+38
2021-07-10Change all 'optflag' arguments to 'optflagmulti'Zach Lute-0/+4
Because specifying these flags multiple times will never be discernibly different in functionality from specifying them a single time, there is no reason to fail and report an error to the user.
2021-07-07Only show restricted pub useGuillaume Gomez-0/+5
2021-07-07Add tests for reexports (both public and private)Guillaume Gomez-14/+137
2021-07-07Add test for reexported macros 2.0 renderingGuillaume Gomez-0/+14
2021-07-06add check on anchor linkFrançois Mockers-0/+1
2021-07-06add mcve as testFrançois Mockers-0/+19
2021-07-05Auto merge of #86282 - camelid:macro_rules-matchers, r=jyn514bors-10/+55
Pretty-print macro matchers instead of using source code Fixes #86208.
2021-07-03rustc_ast_pretty: Don't print space after `$`Noah Lev-15/+19
For example, this code: $arg:expr used to be pretty-printed as: $ arg : expr but is now pretty-printed as: $arg : expr
2021-07-03Pretty-print macro matchers instead of using source codeNoah Lev-15/+14
The output is not quite as nice as it used to be, but it does work.
2021-07-01Revert "Don't load all extern crates unconditionally"Guillaume Gomez-0/+12
2021-06-28Add regression test for #86208Noah Lev-0/+42
This test does not test the output as well as I would like, but I think I am limited by htmldocck. I would really just like to strip all the HTML tags from the output for the sake of the different `@has` checks, but that doesn't seem to be currently possible.
2021-06-28Add test for item-table with resize to mobileStefan Schindler-10/+13
2021-06-26Auto merge of #86449 - Stupremee:render-self-cast-in-type-bound, ↵bors-1/+30
r=GuillaumeGomez rustdoc: Render `<Self as X>::Y` type casts properly across crate bounds My last PR that introduced the type casting did not work for cross-crate re-exported traits, which is fixed in this PR. Fully resolves #85454
2021-06-26Auto merge of #84814 - Stupremee:properly-render-hrtbs, r=GuillaumeGomezbors-12/+61
Properly render HRTBs ```rust pub fn test<T>() where for<'a> &'a T: Iterator, {} ``` This will now render properly including the `for<'a>` ![image](https://user-images.githubusercontent.com/39732259/116808426-fe6ce600-ab38-11eb-9452-f33f554fbb8e.png) I do not know if this covers all cases, it only covers everything that I could think of that includes `for` and lifetimes in where bounds. Also someone need to mentor me on how to add a proper rustdoc test for this. Resolves #78482
2021-06-26Rollup merge of #86513 - fee1-dead:cross-crate-doc-hidden, r=danielhenrymantillaYuki Okushi-0/+76
Rustdoc: Do not list impl when trait has doc(hidden) Fixes #86448.
2021-06-25Renamed test and added test for same crateDeadbeef-3/+39
2021-06-24Migrate from custom elements to divs with classes to be compatible with safariStefan Schindler-54/+56
2021-06-24Fixing the test rustdoc by ignoring ↵Stefan Schindler-3/+3
`*[@id="module-item"]//following-sibling::item-right` relationship and rustdoc-gui
2021-06-24Implement Desktop and Mobile version with gridlayoutStefan Schindler-15/+15
* implement sans-serif #85621
2021-06-23Rollup merge of #86523 - LeSeulArtichaut:macros-disambiguators, r=jyn514Dylan DPC-0/+25
Improvements to intra-doc link macro disambiguators A few small improvements around macro disambiguators: - display the link text as it was entered: previously `[macro!()]` would be displayed without the parantheses (fixes #86309) - support `!{}` and `![]` as macro disambiguators (fixes #86310) r? `@jyn514` cc `@Manishearth` `@camelid`
2021-06-22Add test for macro disambiguatorsLeSeulArtichaut-0/+25
2021-06-22Account for more casesDeadbeef-4/+19
2021-06-22Rollup merge of #86334 - LeSeulArtichaut:86120-links-type-aliases, r=jyn514Yuki Okushi-0/+19
Resolve type aliases to the type they point to in intra-doc links This feels a bit sketchy, but I think it's better than just rejecting the link. Helps with #86120, r? ``@jyn514``
2021-06-22Do not list impl when trait has doc(hidden)Deadbeef-0/+25
2021-06-21Readd `unsafe` keyword in testsDeadbeef-6/+6
2021-06-21Removed/Updated some cases and simplified `match`Deadbeef-28/+3
2021-06-21Added some tests for `unsafe` in const-dispay.rsDeadbeef-6/+47
2021-06-21Check for const_unstable before printing `const`Deadbeef-4/+4
2021-06-21Resolve type aliases to the type they point to in intra-doc linksLeSeulArtichaut-0/+19
2021-06-20"(const: unstable)" for stable-but-const-unstableDeadbeef-0/+2
2021-06-19rustdoc: Introduce new `DynTrait` type for better representation of trait ↵Justus K-0/+8
objects
2021-06-18rustdoc: Render `<Self as X>::Y` type casts properly across crate boundsJustus K-1/+30
2021-06-18rustdoc: Render `for<'_>` lifetimes in trait objectsJustus K-17/+17
2021-06-18rustdoc: Render `for<'_>` lifetimes in front of where boundJustus K-0/+41
2021-06-18Auto merge of #86322 - trinity-1686a:rustdoc-fix-overflow-recursive-deref, ↵bors-0/+44
r=jyn514 fix rustdoc stack overflow on mutually recursive Deref fix #85095 fix #85037
2021-06-16Fix target highlighting in rustdoc.Jacob Hoffman-Andrews-9/+1
Also factor out outer_version and const_outer_version into render_rightside.
2021-06-16Make portability part of the summary.Jacob Hoffman-Andrews-3/+3
That means it will be visible under "Implementors" on trait pages, and under "Implementations" on struct/enum pages, even when all methods are collapsed. Switch to a float layout for rightside elements.
2021-06-16Remove methods under Implementors on trait pagesJacob Hoffman-Andrews-20/+0
These were hidden by default, and duplicated information already on the page anyhow. Also remove the "Auto-hide trait implementors of a trait" setting, which is not needed anymore.
2021-06-16rename test-casesTrinity Pointard-4/+4
2021-06-16Rollup merge of #86327 - GuillaumeGomez:safe-intrinsics, r=lqdYuki Okushi-0/+20
Don't mark "safe" intrinsics as unsafe A good example of this is [intrinsics::abort](https://doc.rust-lang.org/nightly/core/intrinsics/fn.abort.html). Before: ![Screenshot from 2021-06-15 14-58-42](https://user-images.githubusercontent.com/3050060/122056942-65ddad00-cdea-11eb-829e-5f5e258387de.png) After: ![Screenshot from 2021-06-15 14-59-22](https://user-images.githubusercontent.com/3050060/122056956-6aa26100-cdea-11eb-94d8-e18b4956cfa4.png) cc ``@jyn514`` r? ``@lqd``
2021-06-16Rollup merge of #86242 - BoxyUwU:rustdoc-const-evaluatable-ice, r=oli-obkYuki Okushi-0/+7
rustdoc- dont ICE on `ConstEvaluatable` predicates Fixes #77647 rustdoc doesn't need to be handling these as you cant write them, they just get added implicitly when you write a where clause containing an expression.
2021-06-15Add test for safe intrinsicsGuillaume Gomez-0/+20
2021-06-15remove code for recursive Deref in sidebarTrinity Pointard-0/+22
fix #85037
2021-06-15fix rustdoc stack overflow on mutually recursive DerefTrinity Pointard-0/+22
fix #85095