summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2018-05-06rustdoc: Resolve nested `impl Trait`sShotaro Yamada-0/+7
2018-03-31Auto merge of #49459 - GuillaumeGomez:primitive-intra-links, r=QuietMisdreavusbors-0/+19
Add primitive intra-links Part of #43466. r? @QuietMisdreavus
2018-03-29Add primitive intra-linksGuillaume Gomez-0/+19
2018-03-28Rollup merge of #49442 - GuillaumeGomez:text-overlap, r=QuietMisdreavuskennytm-12/+12
Fix text overlap Fixes #49006. r? @QuietMisdreavus
2018-03-28Rollup merge of #49427 - Manishearth:rustdoc-impl-trait-extern, r=GuillaumeGomezkennytm-0/+58
Correctly handle impl trait in external items in rustdoc fixes #49373 r? @QuietMisdreavus
2018-03-28Fix text overlapGuillaume Gomez-12/+12
2018-03-28Auto merge of #49304 - sinkuu:impl_trait_rustdoc, r=QuietMisdreavusbors-0/+46
Rustdoc support for universal_impl_trait Hides type parameters synthesized by `impl Trait`-in-argument-position, and enables links to trait names. <img alt="before" src="https://user-images.githubusercontent.com/7091080/37831646-a61413c6-2ee9-11e8-8ec2-a6137956d922.png" width="450"/> ↓ <img alt="after" src="https://user-images.githubusercontent.com/7091080/37831657-b2ff0ae6-2ee9-11e8-8797-fdad904782bf.png" width="450"/> Fixes #49309
2018-03-27rustdoc: Add test for foreign impl trait with boundsManish Goregaokar-0/+58
2018-03-27Rollup merge of #49333 - GuillaumeGomez:link-assoc-const, r=QuietMisdreavuskennytm-0/+26
Fix impl assoc constant link not working Fixes #49323. r? @QuietMisdreavus
2018-03-26Stabilize conservative_impl_traitTaylor Cramer-2/+0
2018-03-26Stabilize universal_impl_traitTaylor Cramer-1/+0
2018-03-24Fix impl assoc constant link not workingGuillaume Gomez-0/+26
2018-03-24Add test for `impl Trait` in argument positionShotaro Yamada-0/+46
2018-03-22Rollup merge of #49189 - GuillaumeGomez:fix-implied-shortcut-links, ↵kennytm-0/+18
r=QuietMisdreavus Fix automatic urls with backticks Fixes #49164. r? @QuietMisdreavus
2018-03-21add target_feature items to doc_cfg rustdoc testQuietMisdreavus-0/+24
2018-03-19Fix automatic urls with backticksGuillaume Gomez-0/+18
2018-03-13Rollup merge of #48898 - GuillaumeGomez:remove-empty-section, r=QuietMisdreavuskennytm-0/+20
Remove auto trait implementation section when empty Fixes #48882.
2018-03-09Remove auto trait implementation section when emptyGuillaume Gomez-0/+20
2018-03-09Add missing items in the sidebar for functionsGuillaume Gomez-0/+19
2018-02-28Rollup merge of #48473 - GuillaumeGomez:rustdoc-auto-trait-impl-fix, ↵kennytm-0/+26
r=QuietMisdreavus Fix auto trait impl rustdoc ice Fixes #48463. r? @QuietMisdreavus
2018-02-24Rollup merge of #48415 - QuietMisdreavus:traits-on-traits-on-traits, ↵Manish Goregaokar-0/+36
r=Manishearth rustdoc: don't crash when an external trait's docs needs to import another trait Fixes https://github.com/rust-lang/rust/issues/48414 When resolving intra-paths for an item, rustdoc needs to have information about their items on hand, for proper bookkeeping. When loading a path for an external item, it needs to load these items from their host crate, since their information isn't otherwise available. This includes resolving paths for those docs. which can cause this process to recurse. Rustdoc keeps a map of external traits in a `RefCell<HashMap<DefId, Trait>>`, and it keeps a borrow of this active when importing an external trait. In the linked crash, this led to a RefCell borrow error, panic, and ICE. This PR manually releases the borrow while importing the trait, and also keeps a list of traits being imported at the given moment. The latter keeps rustdoc from infinitely recursing as it tries to import the same trait repeatedly.
2018-02-24Fix auto trait impl rustdoc iceGuillaume Gomez-0/+26
2018-02-21add test for issue 48414 ICEQuietMisdreavus-0/+36
2018-02-21Rollup merge of #48382 - GuillaumeGomez:fix-rustdoc-test-panic, r=estebankGuillaume Gomez-0/+23
Fix rustdoc test ICE Fixes #48377. r? @QuietMisdreavus
2018-02-21Rollup merge of #48335 - Manishearth:shortcut-links, r=QuietMisdreavusGuillaume Gomez-0/+12
Implement implied shortcut links for intra-rustdoc-links cc https://github.com/rust-lang/rust/issues/43466 Needs https://github.com/google/pulldown-cmark/pull/126 r? @QuietMisdreavus
2018-02-20Fix rustdoc test ICEGuillaume Gomez-0/+23
2018-02-19Sort synthetic impls bounds before renderingAaron Hill-5/+5
This removes the implicit dependency on the iteration order of FxHashMap
2018-02-18Add testManish Goregaokar-0/+12
2018-02-18Remove extra space in testAaron Hill-2/+2
2018-02-18Generate documentation for auto-trait implsAaron Hill-4/+247
A new section is added to both both struct and trait doc pages. On struct/enum pages, a new 'Auto Trait Implementations' section displays any synthetic implementations for auto traits. Currently, this is only done for Send and Sync. On trait pages, a new 'Auto Implementors' section displays all types which automatically implement the trait. Effectively, this is a list of all public types in the standard library. Synthesized impls for a particular auto trait ('synthetic impls') take into account generic bounds. For example, a type 'struct Foo<T>(T)' will have 'impl<T> Send for Foo<T> where T: Send' generated for it. Manual implementations of auto traits are also taken into account. If we have the following types: 'struct Foo<T>(T)' 'struct Wrapper<T>(Foo<T>)' 'unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes this sound somehow Then Wrapper will have the following impl generated: 'impl<T> Send for Wrapper<T>' reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send' to hold Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are taken into account by synthetic impls However, if a type can *never* implement a particular auto trait (e.g. 'struct MyStruct<T>(*const T)'), then a negative impl will be generated (in this case, 'impl<T> !Send for MyStruct<T>') All of this means that a user should be able to copy-paste a synthetic impl into their code, without any observable changes in behavior (assuming the rest of the program remains unchanged).
2018-02-18Rollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkorGuillaume Gomez-1/+1
fix more typos found by codespell.
2018-02-18Rollup merge of #48274 - GuillaumeGomez:remove-hoedown, r=QuietMisdreavusGuillaume Gomez-2/+0
Remove hoedown from rustdoc Finally the time has come! r? @QuietMisdreavus
2018-02-17fix more typos found by codespell.Matthias Krüger-1/+1
2018-02-17Rollup merge of #48095 - QuietMisdreavus:doctest-assembly, r=GuillaumeGomezGuillaume Gomez-2/+2
add unit tests for rustdoc's processing of doctests cc #42018 There's a lot of things that rustdoc will do to massage doctests into something that can be compiled, and a lot of options that can be toggled to affect this. Hopefully this list of tests can show off that functionality. The first commit is slightly unrelated but doesn't touch public functionality, because i found that if you have a manual `fn main`, it adds an extra line break at the end, whereas it would trim this extra line break if it were putting a `fn main` in automatically. That first commit makes it trim out that whitespace ahead of time.
2018-02-16Remove hoedown from rustdocGuillaume Gomez-2/+0
Is it really time? Have our months, no, *years* of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long? ----- So, timeline for those who need to catch up: * Way back in December 2016, [we decided we wanted to switch out the markdown renderer](https://github.com/rust-lang/rust/issues/38400). However, this was put on hold because the build system at the time made it difficult to pull in dependencies from crates.io. * A few months later, in March 2017, [the first PR was done, to switch out the renderers entirely](https://github.com/rust-lang/rust/pull/40338). The PR itself was fraught with CI and build system issues, but eventually landed. * However, not all was well in the Rustdoc world. During the PR and shortly after, we noticed [some differences in the way the two parsers handled some things](https://github.com/rust-lang/rust/issues/40912), and some of these differences were major enough to break the docs for some crates. * A couple weeks afterward, [Hoedown was put back in](https://github.com/rust-lang/rust/pull/41290), at this point just to catch tests that Pulldown was "spuriously" running. This would at least provide some warning about spurious tests, rather than just breaking spontaneously. * However, the problems had created enough noise by this point that just a few days after that, [Hoedown was switched back to the default](https://github.com/rust-lang/rust/pull/41431) while we came up with a solution for properly warning about the differences. * That solution came a few weeks later, [as a series of warnings when the HTML emitted by the two parsers was semantically different](https://github.com/rust-lang/rust/pull/41991). But that came at a cost, as now rustdoc needed proc-macro support (the new crate needed some custom derives farther down its dependency tree), and the build system was not equipped to handle it at the time. It was worked on for three months as the issue stumped more and more people. * In that time, [bootstrap was completely reworked](https://github.com/rust-lang/rust/pull/43059) to change how it ordered compilation, and [the method by which it built rustdoc would change](https://github.com/rust-lang/rust/pull/43482), as well. This allowed it to only be built after stage1, when proc-macros would be available, allowing the "rendering differences" PR to finally land. * The warnings were not perfect, and revealed a few [spurious](https://github.com/rust-lang/rust/pull/44368) [differences](https://github.com/rust-lang/rust/pull/45421) between how we handled the renderers. * Once these were handled, [we flipped the switch to turn on the "rendering difference" warnings all the time](https://github.com/rust-lang/rust/pull/45324), in October 2017. This began the "warning cycle" for this change, and landed in stable in 1.23, on 2018-01-04. * Once those warnings hit stable, and after a couple weeks of seeing whether we would get any more reports than what we got from sitting on nightly/beta, [we switched the renderers](https://github.com/rust-lang/rust/pull/47398), making Pulldown the default but still offering the option to use Hoedown. And that brings us to the present. We haven't received more new issues from this in the meantime, and the "switch by default" is now on beta. Our reasoning is that, at this point, anyone who would have been affected by this has run into it already.
2018-02-10Rollup merge of #48051 - ollie27:rustdoc_fn_unit_return, r=QuietMisdreavuskennytm-0/+40
rustdoc: Hide `-> ()` in cross crate inlined Fn* bounds
2018-02-09fix playground test for newly-trimmed doctestsQuietMisdreavus-2/+2
2018-02-07rustdoc: Hide `-> ()` in cross crate inlined Fn* boundsOliver Middleton-0/+40
2018-02-06Rollup merge of #47959 - Manishearth:rustdoc-ice, r=Mark-Simulacrumkennytm-0/+16
Fix rustdoc ICE on macros defined within functions fixes #47639
2018-02-03Fix const evaluation ICE in rustdocGuillaume Gomez-0/+22
2018-02-02Add regression testManish Goregaokar-0/+16
2018-01-29rustdoc: Fix link title rendering with hoedownOliver Middleton-0/+19
The link title needs to be HTML escaped.
2018-01-26Merge branch 'rustdoc_masked' of https://github.com/ollie27/rust into rollupAlex Crichton-0/+60
2018-01-25Add testsManish Goregaokar-1/+20
2018-01-23Auto merge of #47678 - kennytm:rollup, r=kennytmbors-0/+36
Rollup of 14 pull requests - Successful merges: #47423, #47425, #47440, #47541, #47549, #47554, #47558, #47610, #47635, #47655, #47661, #47662, #47667, #47672 - Failed merges:
2018-01-23rustdoc: Hide methods from #[doc(masked)] crates from the search indexOliver Middleton-0/+60
2018-01-23rustdoc: Show when traits are auto traitsOliver Middleton-0/+36
2018-01-22value-namespace items require a marker, so emit an errorQuietMisdreavus-3/+3
2018-01-22add ambiguity markers to the intra-links testQuietMisdreavus-0/+14
2018-01-22add a macro to the intra-links testQuietMisdreavus-8/+15