about summary refs log tree commit diff
path: root/src/test/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
2020-04-24Add rustdoc regression test for the unused_braces lintflip1995-0/+14
2020-04-23Rollup merge of #71408 - GuillaumeGomez:check-code-blocks-tags, r=kinnisonDylan DPC-0/+493
Check code blocks tags Fixes #71347. Explanations here: I realized recently that it was a common issue to confuse/misspell tags on code blocks. This is actually quite a big issue since it generally ends up in a code blocks being ignored since it's not being considered as a rust one. With this new warning, users will at least be notified about it. PS: some improvements can be done on the error rendering but considering how big the PR already is, I think it's better to do it afterwards. r? @ollie27 cc @rust-lang/rustdoc
2020-04-23Add UI tests for new rustdoc lintGuillaume Gomez-0/+493
2020-04-19Moving all rustdoc-ui tests to check-passVal Markovic-19/+19
These were all build-pass before and don't seem to need it. Helps with #62277
2020-04-11rustc: Add a warning count upon completionRoccoDev-0/+8
2020-03-28Auto merge of #66938 - GuillaumeGomez:lint-for-no-crate-level-doc, r=Dylan-DPCbors-0/+15
Add lint when no doc is present at the crate-level Follow-up of #66267. r? @kinnison
2020-03-22fix one more testmark-1/+1
2020-03-22Update lint name to follow conventionGuillaume Gomez-3/+3
2020-03-22Update testsGuillaume Gomez-8/+7
2020-03-22Add lint when no doc is present at the crate-levelGuillaume Gomez-0/+16
2020-03-14resolve: Fix regression in resolution of raw keywords in pathsVadim Petrochenkov-5/+5
2020-03-02remove output-format testGuillaume Gomez-10/+0
2020-03-02Replace ToJson with serdeGuillaume Gomez-8/+18
2020-03-02add tests for rustdoc output-format jsonGuillaume Gomez-0/+34
2020-02-09--bless --compare-mode=nllMatthias Prechtl-2/+2
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-0/+1
2020-01-24Normalise notes with the/isvarkor-13/+13
2020-01-20Rollup merge of #68357 - ollie27:rustdoc_test_errors, r=GuillaumeGomezDylan DPC-0/+62
rustdoc: Fix handling of compile errors when running `rustdoc --test` * Call `abort_if_errors` so all errors actually stop rustdoc. * Don't panic with "compiler aborted in rustdoc!", instead just exit to avoid the ugly panic message. * Use rlib as the crate type when searching for doctests matching what is used for doc generation so `#[no_std]` crates don't create "no global memory allocator" errors. Fixes #52243 Fixes #54010 r? @GuillaumeGomez
2020-01-18rustdoc: Fix handling of compile errors when running `rustdoc --test`Oliver Middleton-0/+62
* Call `abort_if_errors` so all errors actually stop rustdoc. * Don't panic with "compiler aborted in rustdoc!", instead just exit to avoid the ugly panic message. * Use rlib as the crate type when searching for doctests matching what is used for doc generation so `#[no_std]` crates don't create "no global memory allocator" errors.
2020-01-17rustdoc: Catch fatal errors when syntax highlightingOliver Middleton-0/+21
For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
2020-01-12Update `output-default.json` and rustdoc testvarkor-1/+1
2020-01-04buffer lexer errors in rustdoc syntax checkingAndy Russell-109/+19
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