summary refs log tree commit diff
path: root/tests/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
2024-10-11Remove deprecation note in the `non_local_definitions` warningUrgau-2/+0
2024-10-04Rollup merge of #131260 - notriddle:notriddle/disambiguator-error, ↵Jubilee-18/+18
r=GuillaumeGomez rustdoc: cleaner errors on disambiguator/namespace mismatches Resolves https://github.com/rust-lang/rust/pull/131224#pullrequestreview-2348407077 r? `@jyn514`
2024-10-04rustdoc: cleaner errors on disambiguator/namespace mismatchesMichael Howell-18/+18
2024-10-04Auto merge of #131237 - GuillaumeGomez:rollup-il2i7z7, r=GuillaumeGomezbors-0/+19
Rollup of 4 pull requests Successful merges: - #131034 (Implement RFC3695 Allow boolean literals as cfg predicates) - #131202 (Use wide pointers consistenly across the compiler) - #131230 (Enable `--no-sandbox` option by default for rustdoc GUI tests) - #131232 (Week off of reviews to focus on docs) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-04Rollup merge of #131034 - Urgau:cfg-true-false, r=nnethercoteGuillaume Gomez-0/+19
Implement RFC3695 Allow boolean literals as cfg predicates This PR implements https://github.com/rust-lang/rfcs/pull/3695: allow boolean literals as cfg predicates, i.e. `cfg(true)` and `cfg(false)`. r? `@nnethercote` *(or anyone with parser knowledge)* cc `@clubby789`
2024-10-04Adjust rustdoc for literal boolean supportUrgau-0/+19
2024-10-03rustdoc: prevent ctors from resolvingMichael Howell-5/+102
2024-10-01Auto merge of #131076 - lukas-code:doc-stab2, r=notriddlebors-0/+2
rustdoc: rewrite stability inheritance as a doc pass Since doc inlining can almost arbitrarily change the module hierarchy, we can't just use the HIR ancestors of an item to compute its effective stability. This PR moves the stability inheritance that I implemented in https://github.com/rust-lang/rust/pull/130798 into a new doc pass `propagate-stability` that runs after doc inlining and uses the post-inlining ancestors of an item to correctly compute its effective stability. fixes https://github.com/rust-lang/rust/issues/131020 r? `@notriddle`
2024-10-01Auto merge of #130587 - coolreader18:field-variant-doclink-disambig, ↵bors-23/+62
r=notriddle,jyn514 Add `field@` and `variant@` doc-link disambiguators I'm not sure if this is big enough to need an fcp or not, but this is something I found missing when trying to refer to a field in macro-generated docs, not knowing if a method might be defined as well. Obviously, there are definitely other uses. In the case where it's not disambiguated, methods (and I suppose other associated items in the value namespace) still take priority, which `@jyn514` said was an oversight but I think is probably the desired behavior 99% of the time anyway - shadowing a field with an accessor method is a very common pattern. If fields and methods with the same name started conflicting, it would be a breaking change. Though, to quote them: > jyn: maybe you can break this only if both [the method and the field] are public > jyn: rustc has some future-incompat warning level > jyn: that gets through -A warnings and --cap-lints from cargo That'd be out of scope of this PR, though. Fixes #80283
2024-09-30rustdoc: rewrite stability inheritance as a passLukas Markeffsky-0/+2
2024-09-29Rename doctest attribute `standalone-crate` into `standalone_crate` for ↵Guillaume Gomez-7/+7
coherency
2024-09-28Improve mistyped docblock attribute warning messagesGuillaume Gomez-58/+58
2024-09-28Add regression tests for mistyped `standalone-crate` attributeGuillaume Gomez-0/+64
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-2/+2
2024-09-23Update rustdoc doctest non_local_defs impl testUrgau-11/+13
2024-09-23Revert "Switch back `non_local_definitions` lint to allow-by-default"Urgau-9/+3
This reverts commit 0c0dfb88eeefbbaa4c10cfa4a7f0e16541e086eb.
2024-09-19Add `field@` and `variant@` doc-link disambiguatorsNoa-23/+62
2024-09-19rustdoc: use the correct span for doctestsMichael Howell-1/+39
2024-09-12rustdoc: re-bless stderrs after renaming the test caseMichael Howell-4/+4
2024-09-12rustdoc: rename `issue-\d+.rs` tests to have meaningful namesMichael Howell-0/+0
2024-09-12Add URL and crate_name to test casesMichael Howell-2/+5
2024-09-09rustdoc: add two regression testsLeón Orell Valerian Liehr-0/+52
2024-08-18Adjust expected errors for a `rustdoc` testTrevor Gross-22/+5
`pulldown-cmark` has slightly different behavior between 0.11.0 and 0.11.2, causing one of the `unportable-markdown` tests to no longer emit an error. Per [1], remove the error annotation and bless the output. [1]: https://github.com/rust-lang/rust/pull/128722#issuecomment-2295522292
2024-08-14Auto merge of #129060 - matthiaskrgr:rollup-s72gpif, r=matthiaskrgrbors-9/+4
Rollup of 7 pull requests Successful merges: - #122884 (Optimize integer `pow` by removing the exit branch) - #127857 (Allow to customize `// TODO:` comment for deprecated safe autofix) - #129034 (Add `#[must_use]` attribute to `Coroutine` trait) - #129049 (compiletest: Don't panic on unknown JSON-like output lines) - #129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML) - #129056 (Fix one usage of target triple in bootstrap) - #129058 (Add mw back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-13Fix commands syntax in rustdoc-ui testsGuillaume Gomez-9/+9
2024-08-13Only keep "useful" code in `tests/rustdoc-ui/2024-doctests-checks.rs`Guillaume Gomez-24/+8
2024-08-13Add doctest to ensure that doctests with crate-level attributes are not part ↵Guillaume Gomez-0/+34
of merged doctest
2024-08-13Add more merged doctests testsGuillaume Gomez-0/+21
2024-08-13Don't special-case if there is only one merged doctestGuillaume Gomez-39/+19
2024-08-13Run mergeable doctest as part of standalone doctests if there is only oneGuillaume Gomez-11/+30
2024-08-13Add 2024 edition doctests to cover corner casesGuillaume Gomez-0/+55
2024-08-13Disable merged doctests by defaultGuillaume Gomez-1/+0
2024-08-13Add/update `rustdoc-ui` tests to check new merged doctestsGuillaume Gomez-9/+42
2024-08-13Correctly handle doctests with invalid ASTGuillaume Gomez-0/+111
2024-08-13Update rustdoc-ui test for `--generate-link-to-definition` optionGuillaume Gomez-1/+4
2024-08-13Remove duplicated rustdoc ui testGuillaume Gomez-8/+0
2024-08-09rustdoc: move invalid langstring test to UIMichael Howell-0/+17
2024-08-07Rollup merge of #128755 - yaahc:jj-crlf, r=estebankMatthias Krüger-27/+27
Integrate crlf directly into related test file instead via of .gitattributes resolves https://github.com/rust-lang/rust/issues/128708 This PR seeks to resolve a contributor papercut when using jj to manage the git repo locally which does not support .gitattributes. It does so by integrating the crlf characters directly into the related test and disabling Git's end of line normalization logic across platforms for that specific file, instead of configuring git to always check out the files with alternative eol characters. related documentation: https://git-scm.com/docs/gitattributes#Documentation/gitattributes.txt-Unset-1
2024-08-06Integrate crlf directly into related test file instead via of .gitattributesJane Losare-Lusby-27/+27
2024-08-06Add regression test for #69264Guillaume Gomez-0/+24
2024-08-06On short error format, append primary span label to messageEsteban Küber-2/+2
The `error-format=short` output only displays the path, error code and main error message all in the same line. We now add the primary span label as well after the error message, to provide more context.
2024-07-29Structured suggestion for `extern crate foo` when `foo` isn't resolved in importEsteban Küber-3/+12
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-25Rollup merge of #128111 - estebank:no-question, r=fmeaseMatthias Krüger-6/+6
Do not use question as label 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-07-25Rollup merge of #127528 - estebank:ascii-control-chars, r=oli-obkMatthias Krüger-1/+1
Replace ASCII control chars with Unicode Control Pictures Replace ASCII control chars like `CR` with Unicode Control Pictures like `␍`: ``` error: bare CR not allowed in doc-comment --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:3:32 | LL | /// doc comment with bare CR: '␍' | ^ ``` Centralize the checking of unicode char width for the purposes of CLI display in one place. Account for the new replacements. Remove unneeded tracking of "zero-width" unicode chars, as we calculate these in the `SourceMap` as needed now.
2024-07-24Do not use question as labelEsteban Küber-6/+6
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-07-22Revert suggestion verbosity changeEsteban Küber-24/+12
2024-07-22On generic and lifetime removal suggestion, do not leave behind stray `,`Esteban Küber-1/+1
2024-07-22Change suggestion message wordingEsteban Küber-4/+4
2024-07-22Use verbose suggestion for "wrong # of generics"Esteban Küber-12/+24
2024-07-21Move all error reporting into rustc_trait_selectionMichael Goulet-1/+1