summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2018-02-22Fix rustdoc test ICEGuillaume Gomez-0/+23
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-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
2018-01-22add basic test for rustdoc intra linksQuietMisdreavus-0/+39
2018-01-17Rollup merge of #47313 - ollie27:rustdoc_record_extern_trait, r=QuietMisdreavusGuillaume Gomez-0/+40
rustdoc: Populate external_traits with traits only seen in impls This means default methods can always be found and "Important traits" will include all spotlight traits.
2018-01-15Reexport -> re-export in prose and documentation commentsCarol (Nichols || Goulding)-1/+1
2018-01-13Adjust tests for removal of `impl Foo for .. {}`leonardo.yvens-12/+3
2018-01-10rustdoc: Populate external_traits with traits only seen in implsOliver Middleton-0/+40
This means default methods can always be found and "Important traits" will include all spotlight traits.
2018-01-09Rollup merge of #47263 - ollie27:rustdoc_private_macro_import, r=GuillaumeGomezkennytm-0/+20
rustdoc: Don't import macros from private imports Fixes #47038
2018-01-09Rollup merge of #47210 - ↵kennytm-0/+18
zackmdavis:the_3rd_of_2_hardest_problems_in_computer_science, r=QuietMisdreavus fix the doc-comment-decoration-trimming edge-case rustdoc ICE This `horizontal_trim` function strips the leading whitespace from doc-comments that have a left-asterisk-margin: ``` /** * You know what I mean— * * comments like this! */ ``` The index of the column of asterisks is `i`, and if trimming is deemed possible, we slice each line from `i+1` to the end of the line. But if, in particular, `i` was 0 _and_ there was an empty line (as in the example given in the reporting issue), we ended up panicking trying to slice an empty string from 0+1 (== 1). Let's tighten our check to say that we can't trim when `i` is even the same as the length of the line, not just when it's greater. (Any such cases would panic trying to slice `line` from `line.len()+1`.) Resolves #47197.
2018-01-08rustdoc: Don't import macros from private importsOliver Middleton-0/+20
2018-01-07Auto merge of #47039 - ollie27:rustdoc_trait_impl_src, r=GuillaumeGomezbors-0/+5
rustdoc: Add missing src links for generic impls on trait pages `implementor2item` would return `None` for generic impls so instead this clones the entire `clean::Item` into the `implementors` map which simplifies some code.
2018-01-06wherein careful doc-decoration arithmetic proves quite the ICE-breakerZack M. Davis-0/+18
This `horizontal_trim` function strips the leading whitespace from doc-comments that have a left-asterisk-margin: /** * You know what I mean— * * comments like this! */ The index of the column of asterisks is `i`, and if trimming is deemed possible, we slice each line from `i+1` to the end of the line. But if, in particular, `i` was 0 _and_ there was an empty line (as in the example given in the reporting issue), we ended up panicking trying to slice an empty string from 0+1 (== 1). Let's tighten our check to say that we can't trim when `i` is even the same as the length of the line, not just when it's greater. (Any such cases would panic trying to slice `line` from `line.len()+1`.) Resolves #47197.
2018-01-06Auto merge of #47083 - CAD97:issue-46976, r=nikomatsakisbors-0/+12
Issue 46976 ICE is due to an empty path segments, so I set the path to be the same as the in band ty params symbol. (I think this is how regular generics end up being handled?) Pinging @cramertj, this is your code I'm editing here.
2017-12-30Hard break for rust-lang/rust#46976Christopher Durham-0/+12
2017-12-30Add trailing newlines to files which have no trailing newlines.kennytm-1/+1
2017-12-28rustdoc: Don't try to generate links for modules in import pathsOliver Middleton-0/+34
The modules may be private or may even be enums so it would generate dead links.
2017-12-27rustdoc: Add missing src links for generic impls on trait pagesOliver Middleton-0/+5
`implementor2item` would return `None` for generic impls so instead this clones the entire `clean::Item` into the `implementors` map which simplifies some code.
2017-12-24Auto merge of #46894 - detrumi:fix-const-eval-trait, r=eddybbors-0/+34
Const-eval array lengths in rustdoc. Fixes #46727 r? @eddyb Big thanks to @eddyb for helping me figure this out.
2017-12-23Testcase for const-eval array lengthsWilco Kusee-0/+34
2017-12-22Rollup merge of #46858 - QuietMisdreavus:external-doc-error, r=estebankkennytm-0/+1
tweaks and fixes for doc(include) This PR makes a handful of changes around `#[doc(include="file.md")]` (https://github.com/rust-lang/rust/issues/44732): * Turns errors when loading files into full errors. This matches the original RFC text. * Makes the `missing_docs` lint check for `#[doc(include="file.md")]` as well as regular `#[doc="text"]` attributes. * Loads files included by `#[doc(include="file.md")]` into dep-info, mirroring the behavior of `include_str!()` and friends. * Adds or modifies tests to check for all of these.
2017-12-22Rollup merge of #46847 - GuillaumeGomez:more-sidebar-escape, r=QuietMisdreavuskennytm-0/+45
Escape more items in the sidebar when needed Fixes #46724. r? @QuietMisdreavus
2017-12-21Escape more items in the sidebar when neededGuillaume Gomez-0/+45
2017-12-20Rollup merge of #46787 - varkor:contrib-6, r=QuietMisdreavuskennytm-0/+23
Add an option to allow rustdoc to list modules by appearance The `--sort-modules-by-appearance` option will list modules in the order that they appear in the source, rather than sorting them alphabetically (as is the default). This resolves #8552.
2017-12-20Rollup merge of #46359 - GuillaumeGomez:remove-dead-linkage, r=QuietMisdreavuskennytm-0/+32
Do not display hidden types, fixes issue 23912 Fixes #23912. r? @QuietMisdreavus (It's the one I was talking about a few days ago, just close it if it's useless.)
2017-12-19test for missing_doc in the external_doc testQuietMisdreavus-0/+1
2017-12-19Add a test for `--sort-modules-by-appearance`varkor-0/+23
2017-12-18Add tests for hidden typesGuillaume Gomez-0/+32
2017-12-18Fix ?Sized where bound not being displayed at the correct placeGuillaume Gomez-0/+16
2017-12-03Auto merge of #46384 - ollie27:rustdoc_inline_assoc, r=QuietMisdreavusbors-0/+105
rustdoc: Fix issues with cross-crate inlined associated items * Visibility was missing from impl items. * Attributes and docs were missing from consts and types in impls. * Const default values were missing from traits. This unifies the code that handles associated items from impls and traits.
2017-12-02Auto merge of #46326 - GuillaumeGomez:sidebar-text, r=QuietMisdreavusbors-0/+23
Fix invalid HTML escape Fixes #46289. r? @QuietMisdreavus
2017-12-02Rollup merge of #46412 - chrisduerr:issue-46380, r=QuietMisdreavuskennytm-0/+34
Hide private trait type params and show hidden items with document-private As discussed in #46380, this PR removes the `strip-hidden` pass from `--document-private-items` which allows showing `#[doc(hidden)]` with rustdoc. The second commit removes the trait implementation from the docs if the trait's parameter is private.
2017-12-02Rollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebankkennytm-0/+15
rustc: Filter out bogus extern crate warnings Rustdoc has for some time now used the "everybody loops" pass in the compiler to avoid typechecking and otherwise avoid looking at implementation details. In #46115 the placement of this pass was pushed back in the compiler to after macro expansion to ensure that it works with macro-expanded code as well. This in turn caused the regression in #46271. The bug here was that the resolver was producing `def_id` instances for "possibly unused extern crates" which would then later get processed during typeck to actually issue lint warnings. The problem was that *after* resolution these `def_id` nodes were actually removed from the AST by the "everybody loops" pass. This later, when we tried to take a look at `def_id`, caused the compiler to panic. The fix applied here is a bit of a heavy hammer which is to just, in this one case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way (basically if it looks like the node was removed after resolution). The real underlying bug here is probably that the "everybody loops" AST pass is being stressed to much beyond what it was originally intended to do, but this should at least fix the ICE for now... Closes #46271
2017-11-30Fix htmldocck namingChristian Duerr-2/+2
After renaming the structs and enums the htmldocck strings still contained the old names. This lead to test failure. These htmldocck tests have been updated to use the proper names of the rust structs and traits.
2017-11-30Hide trait impl with private trait type parameterChristian Duerr-0/+19
Trait's implementations with private type parameters were displayed in the implementing struct's documentation until now. With this change any trait implementation that uses a private type parameter is now hidden in the docs.
2017-11-30Show hidden items with rustdoc's document-privateChristian Duerr-0/+15
When using `#[doc(hidden)]` elements are hidden from docs even when the rustdoc flag `--document-private-items` is set. This behavior has been changed to display all hidden items when the flag is active.
2017-11-30rustc: Filter out bogus extern crate warningsAlex Crichton-0/+15
Rustdoc has for some time now used the "everybody loops" pass in the compiler to avoid typechecking and otherwise avoid looking at implementation details. In #46115 the placement of this pass was pushed back in the compiler to after macro expansion to ensure that it works with macro-expanded code as well. This in turn caused the regression in #46271. The bug here was that the resolver was producing `def_id` instances for "possibly unused extern crates" which would then later get processed during typeck to actually issue lint warnings. The problem was that *after* resolution these `def_id` nodes were actually removed from the AST by the "everybody loops" pass. This later, when we tried to take a look at `def_id`, caused the compiler to panic. The fix applied here is a bit of a heavy hammer which is to just, in this one case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way (basically if it looks like the node was removed after resolution). The real underlying bug here is probably that the "everybody loops" AST pass is being stressed to much beyond what it was originally intended to do, but this should at least fix the ICE for now... Closes #46271
2017-11-30Fix rustoc item summaries that are headersChristian Duerr-0/+13
Rustoc item summaries that are headers were not displayed at all because they started with whitespace. This PR fixes this and now removes the whitespace and then displays the block.