about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2018-08-16Generate blanket implementations for reexported items as wellGuillaume Gomez-0/+18
2018-08-16syntax: also warn about edition "umbrella" features being implied by --edition.Eduard-Mihai Burtescu-1/+1
2018-08-09set the syntax edition in the driver's phase 1QuietMisdreavus-0/+24
2018-08-06Auto merge of #52644 - varkor:lib-feature-gate-2, r=withoutboatsbors-3/+0
Add errors for unknown, stable and duplicate feature attributes - Adds an error for unknown (lang and lib) features. - Extends the lint for unnecessary feature attributes for stable features to libs features (this already exists for lang features). - Adds an error for duplicate (lang and lib) features. ```rust #![feature(fake_feature)] //~ ERROR unknown feature `fake_feature` #![feature(i128_type)] //~ WARNING the feature `i128_type` has been stable since 1.26.0 #![feature(non_exhaustive)] #![feature(non_exhaustive)] //~ ERROR duplicate `non_exhaustive` feature attribute ``` Fixes #52053, fixes #53032 and address some of the problems noted in #44232 (though not unused features). There are a few outstanding problems, that I haven't narrowed down yet: - [x] Stability attributes on macros do not seem to be taken into account. - [x] Stability attributes behind `cfg` attributes are not taken into account. - [x] There are failing incremental tests.
2018-08-06Auto merge of #52990 - Aaron1011:fix/rustdoc-auto-trait-static, r=eddybbors-0/+44
Fix ICE when rustdoc encounters certain usages of HRTBs Fixes #51236 Under certain circumstances, `AutoTraitFinder` could end up computing a `ParamEnv` involving two trait predicates that differed only in the region parameters involved. One of these parameters would be a HRTB, while the other would be a normal region parameter. When this `ParamEnv` was later passed to `SelectionContext`, an `Ambiguity` error would occur, since the erased versions of these predicates would be identical. To solve the issue, we de-duplicate our list of predicates as we build it up. Whenever we encounter two predicates that differ only in their assignment of region parameters (a HRTB vs a normal lifetime parameter), we pick the HRTB. This corresponds to selecting a 'stricter' bound to display in the generated documentation: we're requiring that a particular type works for all possible lifetime parameters if it's going to implement a particular auto trait.
2018-08-06Auto merge of #53002 - QuietMisdreavus:brother-may-i-have-some-loops, r=pnkfelixbors-0/+29
make `everybody_loops` preserve item declarations First half of https://github.com/rust-lang/rust/issues/52545. `everybody_loops` is used by rustdoc to ensure we don't contain erroneous references to platform APIs if one of its uses is pulled in by `#[doc(cfg)]`. However, you can also implement traits for public types inside of functions. This is used by Diesel (probably others, but they were the example that was reported) to get around a recent macro hygiene fix, which has caused their crate to fail to document. While this won't make the traits show up in documentation (that step comes later), it will at least allow files to be generated.
2018-08-05Fix rustdoc testvarkor-2/+0
2018-08-05Fix run-pass-fulldeps testsvarkor-1/+0
2018-08-04add tests for new intra-doc-link behaviorQuietMisdreavus-0/+50
2018-08-04Strengthen testsGuillaume Gomez-0/+1
2018-08-04Fix primitive blanket impls not showing upGuillaume Gomez-0/+31
2018-08-02add rustdoc test for `everybody_loops` fixQuietMisdreavus-0/+29
2018-08-02Filter out duplicated trait predicates when generating auto traitsAaron Hill-0/+24
Fixes #51236
2018-08-02Fix rustdoc crash when 'static bound appears in struct declarationAaron Hill-0/+20
2018-07-28Don't display full blanket implementation and put it into its own sectionGuillaume Gomez-4/+4
2018-07-22Improve codeGuillaume Gomez-3/+3
2018-07-22Add new tests and fix old onesGuillaume Gomez-7/+31
2018-07-22Auto merge of #52368 - ↵bors-0/+39
GuillaumeGomez:intra_doc_link_resolution_failure-documented, r=QuietMisdreavus Add "self" intra-link support Fixes #49583. r? @QuietMisdreavus
2018-07-22Add "self" intra-link supportGuillaume Gomez-0/+39
2018-07-17Rollup merge of #52385 - GuillaumeGomez:pass-edition-to-parser, ↵kennytm-0/+24
r=QuietMisdreavus Pass edition flags to compiler from rustdoc as expected Fixes #52357.
2018-07-14Pass edition flags to compiler from rustdoc as expectedGuillaume Gomez-0/+24
2018-07-13add test for issue 52129QuietMisdreavus-0/+18
2018-07-10rustdoc: Hide struct and enum variant constructor importsOliver Middleton-0/+25
2018-07-06Auto merge of #51861 - GuillaumeGomez:prevent-some-markdown-short-doc, ↵bors-0/+35
r=QuietMisdreavus Prevent some markdown transformation on short docblocks Before: <img width="1440" alt="screen shot 2018-06-28 at 01 46 01" src="https://user-images.githubusercontent.com/3050060/42005762-7d533bbe-7a76-11e8-8361-027886803399.png"> After: <img width="1440" alt="screen shot 2018-06-28 at 01 46 02" src="https://user-images.githubusercontent.com/3050060/42005768-81bd59a0-7a76-11e8-819b-9b4be72579d6.png"> This is only performed on short doc blocks, not on plain ones. Not all transformations are prevented (you still have a few like urls, code blocks, etc...). cc @nical r? @QuietMisdreavus
2018-07-03test for renaming re-exported macrosQuietMisdreavus-0/+6
2018-06-28Prevent some markdown transformation on short docblocksGuillaume Gomez-0/+35
2018-06-17fix test pub-use-extern-macrosQuietMisdreavus-1/+1
2018-06-17fix cross-crate-links testQuietMisdreavus-1/+1
hey look, macros properly link to the right place now
2018-06-17rustdoc: import cross-crate macros alongside everything elseQuietMisdreavus-0/+77
2018-06-17Auto merge of #51425 - QuietMisdreavus:thats-def-a-namespace-there, ↵bors-0/+26
r=petrochenkov refactor: create multiple HIR items for imports When lowering `use` statements into HIR, they get a `Def` of the thing they're pointing at. This is great for things that need to know what was just pulled into scope. However, this is a bit misleading, because a `use` statement can pull things from multiple namespaces if their names collide. This is a problem for rustdoc, because if there are a module and a function with the same name (for example) then it will only document the module import, because that's that the lowered `use` statement points to. The current version of this PR does the following: * Whenever the resolver comes across a `use` statement, it loads the definitions into a new `import_map` instead of the existing `def_map`. This keeps the resolutions per-namespace so that all the target definitions are available. * When lowering `use` statements, it looks up the resolutions in the `import_map` and creates multiple `Item`s if there is more than one resolution. * To ensure the `NodeId`s are properly tracked in the lowered module, they need to be created in the AST, and pulled out as needed if multiple resolutions are available. Fixes https://github.com/rust-lang/rust/issues/34843
2018-06-17Auto merge of #51382 - GuillaumeGomez:intra-link-lint, r=QuietMisdreavusbors-2/+2
Add lint for intra link resolution failure This PR is almost done, just remains this note: ``` note: requested on the command line with `-W intra-link-resolution-failure` ``` I have no idea why my lint is considered as being passed through command line and wasn't able to find where it was set. If anyone has an idea, it'd be very helpful! cc @QuietMisdreavus
2018-06-15process cross-crate glob re-exportsQuietMisdreavus-0/+36
2018-06-14add test for issue 34843QuietMisdreavus-0/+26
2018-06-13Fix rustdoc test failureGuillaume Gomez-2/+2
2018-06-12add test for --extern-html-root-urlQuietMisdreavus-0/+18
2018-06-06rustdoc: Fix missing stability and src links for inlined external macrosOliver Middleton-0/+49
2018-06-05Rollup merge of #51256 - GuillaumeGomez:fix-rustdoc-crate-name, ↵Mark Simulacrum-0/+13
r=QuietMisdreavus Fix crate-name option in rustdoc Fixes #51229. r? @QuietMisdreavus
2018-06-04Fix crate-name option in rustdocGuillaume Gomez-0/+13
2018-06-04Add even more testsGuillaume Gomez-0/+3
2018-06-04Put doc keyword behind feature flagGuillaume Gomez-0/+2
2018-06-04Add doc keyword supportGuillaume Gomez-0/+19
2018-06-03Auto merge of #50953 - GuillaumeGomez:attributes-in-other-places, ↵bors-0/+32
r=QuietMisdreavus Add attributes for trait and methods as well Fixes #48485. r? @QuietMisdreavus
2018-06-02Add attributes for trait and methods as wellGuillaume Gomez-0/+32
2018-06-02Rustdoc itself no longer requires proc macros to buildMark Simulacrum-0/+1
This avoids a full compiler build in order to build and/or run tests for rustdoc.
2018-05-24Rollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27kennytm-2/+3
rustdoc: hide macro export statements from docs As mentioned in https://github.com/rust-lang/rust/issues/50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta. What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve https://github.com/rust-lang/rust/issues/34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.
2018-05-23fix @!has conditions in pub-use-extern-macros testQuietMisdreavus-3/+3
2018-05-23update "pub-use-extern-macros" test to hide the regular import statementQuietMisdreavus-0/+1
2018-05-18Auto merge of #50533 - GuillaumeGomez:rustdoc-prim-auto, r=QuietMisdreavusbors-0/+17
add auto-impl for primitive type Part of #50431. I have no clue how to test this though with the rustdoc test suite... r? @QuietMisdreavus
2018-05-16Fix rustdoc panic with `impl Trait` in type parametersShotaro Yamada-1/+13
2018-05-15add auto-impl for primitive typeGuillaume Gomez-0/+17