summary refs log tree commit diff
path: root/src/test/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
2019-12-04rustdoc: Add test for fixed issueOliver Middleton-0/+15
2019-11-27Auto merge of #66675 - GuillaumeGomez:support-anchors-intra-doc-links, ↵bors-28/+105
r=kinnison Support anchors intra doc links Fixes #62833 Part of #43466. cc @ollie27 r? @kinnison
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-16/+16
Various tweaks to diagnostic output
2019-11-25Update error messagesGuillaume Gomez-36/+36
2019-11-24Fix some rustdoc error capitalizationEsteban Küber-16/+16
2019-11-23Add test for anchorsGuillaume Gomez-0/+77
2019-11-21Point at type in `let` assignment on type errorsEsteban Küber-1/+3
2019-11-18Surround types with backticks in type errorsEsteban Küber-1/+1
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-3/+0
2019-11-13Rollup merge of #66166 - GuillaumeGomez:rename-rustdoc-to-doc, r=QuietMisdreavusYuki Okushi-3/+3
rename cfg(rustdoc) into cfg(doc) Needed by https://github.com/rust-lang/rust/pull/61351 r? @QuietMisdreavus
2019-11-10Add warning annotations to rustdoc-ui testsTomasz Miąsko-46/+67
2019-11-06rename cfg(rustdoc) into cfg(doc)Guillaume Gomez-3/+3
2019-11-03use silent emitter for rustdoc highlighting passAndy Russell-64/+0
2019-10-29stabilize cfg(doctest)Guillaume Gomez-4/+2
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+15
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-10-21Rollup merge of #65314 - tmiasko:rustdoc-z, r=ollie27Mazdak Farrokhzad-15/+15
rustdoc: forward -Z options to rustc Currently rustdoc does not forward `-Z` options to rustc when building test executables. This makes impossible to use rustdoc to run test samples when crate under test is instrumented with one of sanitizers `-Zsanitizer=...`, since the final linking step will not include sanitizer runtime library. Forward `-Z` options to rustc to solve the issue. Helps with #43031.
2019-10-11rustdoc: forward -Z options to rustcTomasz Miąsko-15/+15
Currently rustdoc does not forward `-Z` options to rustc when building test executables. This makes impossible to use rustdoc to run test samples when crate under test is instrumented with one of sanitizers `-Zsanitizer=...`, since the final linking step will not include sanitizer runtime library. Forward `-Z` options to rustc to solve the issue. Helps with #43031.
2019-10-10Add and update rustdoc ui testGuillaume Gomez-2/+24
2019-10-10Don't pass doctest feature by defaultGuillaume Gomez-3/+2
2019-10-01Add new rustdoc-ui test to ensuire that rustdoc feature isn't passed down to ↵Guillaume Gomez-0/+20
doctests
2019-09-07rustdoc: fix diagnostic with mixed code block stylesEric Huss-0/+26
2019-08-31Auto merge of #63703 - tommilligan:warn-empty-doctest, r=ollie27bors-0/+32
rustdoc: warn on empty doc test Closes #60319. A doc test that only contains whitespace should result in a warning. This PR adds detection of empty doc tests to `check-code-block-syntax`, as having an invalid doc test is mutually exclusive with an empty doc test.
2019-08-24Improve Rustdoc's handling of procedural macrosAaron Hill-7/+8
Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-19librustdoc: warn on empty doc testTom Milligan-0/+32
2019-08-05adapt rustdoc to infailable lexerAleksey Kladov-14/+154
2019-08-02Replace `abstract type` with type alias `impl Trait`varkor-1/+1
2019-08-02Replace "existential" by "opaque"varkor-3/+4
2019-07-17normalize use of backticks in compiler messages for librustc/lintSamy Kacimi-5/+5
https://github.com/rust-lang/rust/issues/60532
2019-07-06force single-threaded text executionQuietMisdreavus-2/+2
2019-07-06rustdoc: set cfg(doctest) when collecting doctestsQuietMisdreavus-3/+14
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-15/+15
2019-06-08Fix tests after revert of rustdoc cfg(test) featureOliver Middleton-3/+6
2019-06-05Reblessed tests.Alexander Regueiro-1/+1
2019-05-22do not print panic message on doctest failuresAndy Russell-18/+110
2019-05-21Move `edition` outside the hygiene lock and avoid accessing itJohn Kåre Alsaker-3/+3
2019-05-18Update rustdoc-ui testsGuillaume Gomez-8/+38
2019-05-18Fix lints handling in rustdocGuillaume Gomez-0/+39
2019-05-03Rollup merge of #60220 - euclio:rustdoc-test-fatal-parsing-errors, ↵Mazdak Farrokhzad-2/+36
r=QuietMisdreavus report fatal errors during doctest parsing Fixes #59557.
2019-04-26Rollup merge of #59940 - GuillaumeGomez:rustdoc-test, r=ollie27Mazdak Farrokhzad-0/+25
Set cfg(test) when rustdoc is running with --test option Following a [discussion on twitter](https://twitter.com/burntsushi5/status/1117091914199785473), I proposed this change. What do you think about it? r? @QuietMisdreavus cc @BurntSushi
2019-04-24Add test for rustdoc cfg(test) featureGuillaume Gomez-0/+25
2019-04-24report fatal errors during doctest parsingAndy Russell-2/+36
2019-04-23Remove unnecessary tidy ignore directivesvarkor-4/+2
2019-03-25compiletest: make path normalization smarterAndy Russell-41/+41
2019-03-15use `!` in macro disambiguation suggestionAndy Russell-3/+3
2019-03-15replace ad-hoc namespace enumsAndy Russell-5/+5
2019-03-15overhaul intra-doc-link ambiguity warningAndy Russell-0/+118
- Makes the warning part of the `intra_doc_link_resolution_failure` lint. - Tightens the span to just the ambiguous link. - Reports ambiguities across all three namespaces. - Uses structured suggestions for disambiguation. - Adds a test for the warnings.
2019-03-11Update testsVadim Petrochenkov-7/+7
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-4/+19
2019-03-09Rollup merge of #58626 - QuietMisdreavus:doc-coverage, r=GuillaumeGomezMazdak Farrokhzad-0/+222
rustdoc: add option to calculate "documentation coverage" This PR adds a new flag to rustdoc, `--show-coverage`. When passed, this flag will make rustdoc count the number of items in a crate with documentation instead of generating docs. This count will be output as a table of each file in the crate, like this (when run on my crate `egg-mode`): ``` +-------------------------------------+------------+------------+------------+ | File | Documented | Total | Percentage | +-------------------------------------+------------+------------+------------+ | src/auth.rs | 16 | 16 | 100.0% | | src/common/mod.rs | 1 | 1 | 100.0% | | src/common/response.rs | 9 | 9 | 100.0% | | src/cursor.rs | 24 | 24 | 100.0% | | src/direct/fun.rs | 6 | 6 | 100.0% | | src/direct/mod.rs | 41 | 41 | 100.0% | | src/entities.rs | 50 | 50 | 100.0% | | src/error.rs | 27 | 27 | 100.0% | | src/lib.rs | 1 | 1 | 100.0% | | src/list/fun.rs | 19 | 19 | 100.0% | | src/list/mod.rs | 22 | 22 | 100.0% | | src/media/mod.rs | 27 | 27 | 100.0% | | src/place/fun.rs | 8 | 8 | 100.0% | | src/place/mod.rs | 35 | 35 | 100.0% | | src/search.rs | 26 | 26 | 100.0% | | src/service.rs | 74 | 74 | 100.0% | | src/stream/mod.rs | 49 | 49 | 100.0% | | src/tweet/fun.rs | 15 | 15 | 100.0% | | src/tweet/mod.rs | 73 | 73 | 100.0% | | src/user/fun.rs | 24 | 24 | 100.0% | | src/user/mod.rs | 87 | 87 | 100.0% | +-------------------------------------+------------+------------+------------+ | Total | 634 | 634 | 100.0% | +-------------------------------------+------------+------------+------------+ ``` Trait implementations are not counted because by default they "inherit" the docs from the trait, even though an impl can override those docs. Similarly, inherent impl blocks are not counted at all, because for the majority of cases such docs are not useful. (The usual pattern for inherent impl blocks is to throw all the methods on a type into a single impl block. Any docs you would put on that block would be better served on the type itself.) In addition, `--show-coverage` can be combined with `--document-private-items` to get the coverage counts for everything in the crate, not just public items. The coverage calculation is implemented as a late pass and two new sets of passes which strip out most of the work that rustdoc otherwise does when generating docs. The is because after the new pass is executed, rustdoc immediately closes instead of going on to generate documentation. Many examples of coverage calculations have been included as `rustdoc-ui` tests. r? @rust-lang/rustdoc
2019-02-28update rustdoc coverage tests with new table layoutQuietMisdreavus-80/+51