about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2018-09-20Add test for doctest edition supportPhilip Munksgaard-0/+54
2018-09-18Rollup merge of #54097 - GuillaumeGomez:remove-keyword-namespace, ↵Guillaume Gomez-0/+1
r=QuietMisdreavus rustdoc: Remove namespace for keywords Fixes #54084. r? @QuietMisdreavus
2018-09-16Check the remaining nodesKazuyoshi Kato-0/+4
2018-09-14Add a test to prevent regressionKazuyoshi Kato-0/+26
The way it defines implementations is unrealistic though.
2018-09-12Auto merge of #53409 - GuillaumeGomez:associated-const-value, r=QuietMisdreavusbors-29/+4
Don't show associated const value anymore Part of #44348. Before: <img width="1440" alt="screen shot 2018-08-16 at 00 48 30" src="https://user-images.githubusercontent.com/3050060/44177414-20ef1480-a0ee-11e8-80d4-7caf082cf0de.png"> After: <img width="1440" alt="screen shot 2018-08-16 at 00 48 23" src="https://user-images.githubusercontent.com/3050060/44177417-251b3200-a0ee-11e8-956a-4229275e3342.png"> cc @nox r? @QuietMisdreavus
2018-09-10Remove namespace for keywordsGuillaume Gomez-0/+1
2018-09-09rustdoc: Remove generated blanket impls from trait pagesOliver Middleton-0/+37
2018-09-06Fix hover on implsGuillaume Gomez-2/+4
2018-09-01Auto merge of #53604 - oli-obk:min_const_fn, r=Centril,varkorbors-3/+3
Implement the `min_const_fn` feature gate cc @RalfJung @eddyb r? @Centril implements the feature gate for #53555 I added a hack so the `const_fn` feature gate also enables the `min_const_fn` feature gate. This ensures that nightly users of `const_fn` don't have to touch their code at all. The `min_const_fn` checks are run first, and if they succeeded, the `const_fn` checks are run additionally to ensure we didn't miss anything.
2018-08-31Auto merge of #51384 - QuietMisdreavus:extern-version, r=GuillaumeGomezbors-0/+18
rustdoc: add flag to control the html_root_url of dependencies The `--extern-html-root-url` flag in this PR allows one to override links to crates whose docs are not already available locally in the doc bundle. Docs.rs currently uses a version of this to make sure links to other crates go into that crate's docs.rs page. See the included test for intended use, but the idea is as follows: Calling rustdoc with `--extern-html-root-url crate=https://some-url.com` will cause rustdoc to override links that point to that crate to instead be replaced with a link rooted at `https://some-url.com/`. (e.g. for docs.rs this would be `https://docs.rs/crate/0.1.0` or the like.) Cheekily, rustup could use these options to redirect links to std/core/etc to instead point to locally-downloaded docs, if it so desired. Fixes https://github.com/rust-lang/rust/issues/19603
2018-08-31Restrict most uses of `const_fn` to `min_const_fn`Oliver Schneider-3/+3
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-1/+1
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-26Remove static and const initialization from documentationGuillaume Gomez-3/+3
2018-08-25Update testsGuillaume Gomez-26/+1
2018-08-22Rollup merge of #53541 - GuillaumeGomez:fix-impl-trait-ret-type, r=oli-obkGuillaume Gomez-0/+40
Fix missing impl trait display as ret type I need to convert a `TraitPredicate` into a `TraitBound` to get the returned impl trait. So far, didn't find how or even if it was the good way to do it. cc @eddyb @oli-obk (since you're the one behind the change apparently 😉)
2018-08-21Auto merge of #53439 - ↵bors-0/+18
GuillaumeGomez:generate-blanket-impls-for-reexported-items, r=QuietMisdreavus Generate blanket implementations for reexported items as well Fixes #53374. r? @QuietMisdreavus
2018-08-21Fix missing impl trait display as ret typeGuillaume Gomez-0/+40
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-17Auto merge of #50911 - petrochenkov:macuse, r=alexcrichtonbors-7/+0
Stabilize `use_extern_macros` Closes https://github.com/rust-lang/rust/issues/35896
2018-08-17Stabilize `use_extern_macros`Vadim Petrochenkov-7/+0
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