about summary refs log tree commit diff
path: root/tests/rustdoc-ui/intra-doc
AgeCommit message (Collapse)AuthorLines
2025-08-11don't emit rustdoc::broken_intra_doc_links for stuff like [!NOTE]binarycat-0/+6
2025-07-24move bad-intra-doc test into intra-doc dirbinarycat-0/+46
2025-07-24rustdoc::broken_intra_doc_links: only be lenient with shortcut linksbinarycat-2/+10
collapsed links and reference links have a pretty particular syntax, it seems unlikely they would show up on accident. Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2025-07-24rustdoc: update tests to match new lint behaviorbinarycat-25/+1
2025-07-24adjust more unit tests to reflect more aggressive intra-doc lintingbinarycat-1/+25
2025-05-28Rollup merge of #141411 - lolbinarycat:rustdoc-link-proc-macro-91274, ↵Trevor Gross-0/+43
r=GuillaumeGomez rustdoc: linking to a local proc macro no longer warns fixes https://github.com/rust-lang/rust/issues/91274 tried to keep the fix general in case we ever have any other kind of item that occupies multiple namespaces simultaniously.
2025-05-27rustdoc: linking to a local proc macro no longer warnsbinarycat-0/+43
fixes https://github.com/rust-lang/rust/issues/91274 Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-05-22rustdoc: improve diagnostics on raw doc fragmentsbinarycat-28/+8
1. rustdoc::bare_urls doesn't output invalid suggestions if source_span_for_markdown_range fails to find a span 2. source_span_for_markdown_range tries harder to return a span by applying an additional diagnostic fixes https://github.com/rust-lang/rust/issues/135851
2025-04-19Add regression test for #140026Guillaume Gomez-0/+22
2025-04-10replace `//@ compile-flags: --edition` with `//@ edition`Pietro Albini-1/+2
2025-02-15rustdoc: improve refdef handling in the unresolved link lintMichael Howell-30/+79
This commit takes advantage of a feature in pulldown-cmark that makes the list of link definitions available to the consuming application. It produces unresolved link warnings for refdefs that aren't used, and can now produce exact spans for the dest even when it has escapes.
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-56/+84
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-01-30Give 104145, 103463, and 31948 more descriptive namesMichael Howell-0/+0
2025-01-29rustdoc: rename `issue-\d+.rs` tests to have meaningful namesMichael Howell-0/+32
2025-01-24Reword "crate not found" resolve messageEsteban Küber-3/+3
``` error[E0432]: unresolved import `some_novel_crate` --> file.rs:1:5 | 1 | use some_novel_crate::Type; | ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate` ``` On resolve errors where there might be a missing crate, mention `cargo add foo`: ``` error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope` --> $DIR/conflicting-impl-with-err.rs:4:11 | LL | impl From<nope::Thing> for Error { | ^^^^ use of unresolved module or unlinked crate `nope` | = help: if you wanted to use a crate named `nope`, use `cargo add nope` to add it to your `Cargo.toml` ```
2024-12-27Remove the `-test` suffix from normalize directivesZalathar-2/+2
2024-11-23only store valid proc marco item for doc linkbohan-0/+28
2024-10-15Improve documentation for intra-doc links computationGuillaume Gomez-2/+2
2024-10-14Add regression tests for #130233Guillaume Gomez-0/+64
2024-10-04rustdoc: cleaner errors on disambiguator/namespace mismatchesMichael Howell-18/+18
2024-10-03rustdoc: prevent ctors from resolvingMichael Howell-5/+102
2024-09-19Add `field@` and `variant@` doc-link disambiguatorsNoa-23/+62
2024-08-06Integrate crlf directly into related test file instead via of .gitattributesJane Losare-Lusby-27/+27
2024-07-29Structured suggestion for `extern crate foo` when `foo` isn't resolved in importEsteban Küber-1/+4
When encountering a name in an import that could have come from a crate that wasn't imported, use a structured suggestion to suggest `extern crate foo;` pointing at the right place in the crate. When encountering `_` in an import, do not suggest `extern crate _;`. ``` error[E0432]: unresolved import `spam` --> $DIR/import-from-missing-star-3.rs:2:9 | LL | use spam::*; | ^^^^ maybe a missing crate `spam`? | help: consider importing the `spam` crate | LL + extern crate spam; | ```
2024-07-24Do not use question as labelEsteban Küber-2/+2
We don't want to have questions in the diagnostic output. Instead, we use wording that communicates uncertainty, like "might": ``` error[E0432]: unresolved import `spam` --> $DIR/import-from-missing-star-3.rs:2:9 | LL | use spam::*; | ^^^^ you might be missing crate `spam` | = help: consider adding `extern crate spam` to use the `spam` crate ```
2024-03-29rustdoc: point at span in `include_str!`-ed md fileMichael Howell-13/+10
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-46/+46
2024-01-13Bless testsGeorge-lewis-0/+2
Update tests
2023-11-24Bless rustdoc-ui testsNilstrieb-16/+16
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-05Add a note to duplicate diagnosticsAlex Macleod-0/+1
2023-07-22add tests for broken links in unused doc stringsLukas Markeffsky-0/+43
2023-05-26rustdoc: get unnormalized link destination for suggestionsMichael Howell-3/+416
Fixes #110111 This bug, and the workaround in this commit, is closely linked to [raphlinus/pulldown-cmark#441], getting offsets of link components. In particular, pulldown-cmark doesn't provide the offsets of the contents of a link. To work around this, rustdoc parser parts of a link definition itself. [raphlinus/pulldown-cmark#441]: https://github.com/raphlinus/pulldown-cmark/issues/441
2023-05-23Add regression test for #111189Guillaume Gomez-0/+31
2023-04-29move lint tests into subdirectoriesjyn-0/+159
2023-04-29Move some rustdoc-ui tests to subdirectoriesjyn-0/+19
2023-04-26Rollup merge of #110329 - aDotInTheVoid:json-inline-again, r=jyn514jyn-11/+0
Improve tests for #110138 These should live in rustdoc-json, not rustdoc-ui, so we can run assertions, and not just check there's no ICE CC #100515, as we never document this suite r? rustdoc
2023-04-18rustdoc: fix ICE from rustc_resolve and librustdoc parse divergenceMichael Howell-0/+60
2023-04-14Move test from rustdoc-ui to rustdoc-jsonAlona Enraght-Moony-11/+0
2023-04-10fix(doc): do not parse inline when output is json for external cratebohan-0/+11
2023-04-05Bless rustdoc-ui test with new errors orderRémy Rakic-15/+15
The order in which the multiple errors for the ambiguous intra doc links are printed is different.
2023-03-31Rollup merge of #109104 - ↵Guillaume Gomez-47/+460
GuillaumeGomez:fix-invalid-suggestion-ambiguous-intra-doc2, r=oli-obk,notriddle rustdoc: Fix invalid suggestions on ambiguous intra doc links v2 Fixes https://github.com/rust-lang/rust/issues/108653. This is another approach to fixing the same issue. This time, we keep the computed information around instead of re-computing it. Strangely enough, the order for ambiguities seem to have been changed. Not an issue but it creates a lot of diff... So which version do you prefer? r? `@notriddle`
2023-03-24Put back `is_derive_trait_collision` checkGuillaume Gomez-0/+22
2023-03-24Update UI tests for primitive type ambiguity error renamingGuillaume Gomez-25/+25
2023-03-24Add regression tests for #108653Guillaume Gomez-25/+416
2023-03-23rustdoc: Skip doc link resolution for non-exported itemsVadim Petrochenkov-0/+13
2023-03-21rustdoc: Cleanup parent module tracking for doc linksVadim Petrochenkov-0/+11
Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.
2023-03-17rustdoc: Correctly merge import's and its target's docs in one more caseVadim Petrochenkov-0/+16
2023-02-20Make `configure_and_expand` "infalllible" by just aborting the compilation ↵Oli Scherer-3/+1
if it fails instead of bubbling out an error
2023-02-19Rollup merge of #107951 - petrochenkov:procmacdoc, r=jackh726Dylan DPC-0/+27
resolve: Fix doc links referring to other crates when documenting proc macro crates directly Fixes https://github.com/rust-lang/rust/issues/107950
2023-02-18rustdoc: Cleanup broken link callbacksVadim Petrochenkov-16/+16