about summary refs log tree commit diff
path: root/tests/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
2023-11-04Remove support for compiler plugins.Nicholas Nethercote-2/+2
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
2023-10-31Accept less invalid Rust in rustdocOli Scherer-60/+376
2023-10-20s/generator/coroutine/Oli Scherer-1/+1
2023-10-17Rollup merge of #111072 - Urgau:check-cfg-new-syntax, r=petrochenkovMatthias Krüger-3/+3
Add new simpler and more explicit syntax for check-cfg <details> <summary> Old proposition (before the MCP) </summary> This PR adds a new simpler and more explicit syntax for check-cfg. It consist of two new form: - `exhaustive(names, values)` - `configure(name, "value1", "value2", ... "valueN")` The preview forms `names(...)` and `values(...)` have implicit meaning that are not strait-forward. In particular `values(foo)`&`values(bar)` and `names(foo, bar)` are not equivalent which has created [some confusions](https://github.com/rust-lang/rust/pull/98080). Also the `names()` and `values()` form are not clear either and again created some confusions where peoples believed that `values()`&`values(foo)` could be reduced to just `values(foo)`. To fix that the two new forms are made to be explicit and simpler. See the table of correspondence: - `names()` -> `exhaustive(names)` - `values()` -> `exhaustive(values)` - `names(foo)` -> `exhaustive(names)`&`configure(foo)` - `values(foo)` -> `configure(foo)` - `values(feat, "foo", "bar")` -> `configure(feat, "foo", "bar")` - `values(foo)`&`values(bar)` -> `configure(foo, bar)` - `names()`&`values()`&`values(my_cfg)` -> `exhaustive(names, values)`&`configure(my_cfg)` Another benefits of the new syntax is that it allow for further options (like conditional checking for --cfg, currently always on) without syntax change. The two previous forms are deprecated and will be removed once cargo and beta rustc have the necessary support. </details> This PR is the first part of the implementation of [MCP636 - Simplify and improve explicitness of the check-cfg syntax](https://github.com/rust-lang/compiler-team/issues/636). ## New `cfg` form It introduces the new [`cfg` form](https://github.com/rust-lang/compiler-team/issues/636) and deprecate the other two: ``` rustc --check-cfg 'cfg(name1, ..., nameN, values("value1", "value2", ... "valueN"))' ``` ## Default built-in names and values It also changes the default for the built-in names and values checking. - Built-in values checking would always be activated as long as a `--check-cfg` argument is present - Built-in names checking would always be activated as long as a `--check-cfg` argument is present **unless** if any `cfg(any())` arg is passed ~~**Note: depends on https://github.com/rust-lang/rust/pull/111068 but is reviewable (last two commits)!**~~ Resolve https://github.com/rust-lang/compiler-team/issues/636 r? `@petrochenkov`
2023-10-16rustdoc: add `check-pass` to ICE test with no expected outputMichael Howell-0/+2
2023-10-16rustdoc: move ICE test to rustdoc-uiMichael Howell-0/+14
2023-10-16Rollup merge of #116257 - estebank:issue-101351, r=b-naberMatthias Krüger-1/+6
Suggest trait bounds for used associated type on type param Fix #101351. When an associated type on a type parameter is used, and the type parameter isn't constrained by the correct trait, suggest the appropriate trait bound: ``` error[E0220]: associated type `Associated` not found for `T` --> file.rs:6:15 | 6 | field: T::Associated, | ^^^^^^^^^^ there is a similarly named associated type `Associated` in the trait `Foo` | help: consider restricting type parameter `T` | 5 | struct Generic<T: Foo> { | +++++ ``` When an associated type on a type parameter has a typo, suggest fixing it: ``` error[E0220]: associated type `Baa` not found for `T` --> $DIR/issue-55673.rs:9:8 | LL | T::Baa: std::fmt::Debug, | ^^^ there is a similarly named associated type `Bar` in the trait `Foo` | help: change the associated type name to use `Bar` from `Foo` | LL | T::Bar: std::fmt::Debug, | ~~~ ```
2023-10-13Tweak wordingEsteban Küber-1/+1
2023-10-13Suggest trait bounds for used associated type on type paramEsteban Küber-0/+5
Fix #101351. When an associated type on a type parameter is used, and the type parameter isn't constrained by the correct trait, suggest the appropriate trait bound: ``` error[E0220]: associated type `Associated` not found for `T` --> file.rs:6:15 | 6 | field: T::Associated, | ^^^^^^^^^^ there is a similarly named associated type `Associated` in the trait `Foo` | help: consider restricting type parameter `T` | 5 | struct Generic<T: Foo> { | +++++ ``` When an associated type on a type parameter has a typo, suggest fixing it: ``` error[E0220]: associated type `Baa` not found for `T` --> $DIR/issue-55673.rs:9:8 | LL | T::Baa: std::fmt::Debug, | ^^^ there is a similarly named associated type `Bar` in the trait `Foo` | help: change the associated type name to use `Bar` from `Foo` | LL | T::Bar: std::fmt::Debug, | ~~~ ```
2023-10-13MCP636: Adapt check-cfg tests to the new syntaxUrgau-3/+3
2023-10-12check-cfg: update rustdoc ui check-cfg testsUrgau-2/+2
2023-10-05Add a note to duplicate diagnosticsAlex Macleod-29/+26
2023-09-24Add regression test for #102467Guillaume Gomez-0/+24
2023-09-19Update tests for custom classesGuillaume Gomez-41/+9
2023-09-19Add new rustdoc-ui test for `custom_code_classes_in_docs` featureGuillaume Gomez-1/+20
2023-09-17Update tests for `custom_code_classes_in_docs` featureGuillaume Gomez-5/+9
2023-09-15Implement new eBNF for codeblock attributesGuillaume Gomez-61/+145
2023-09-15Add support for double quotes in markdown codeblock attributesGuillaume Gomez-0/+50
2023-09-15Add tests for `custom_code_classes_in_docs` featureGuillaume Gomez-0/+136
2023-08-21rustdoc: use unicode-aware checks for redundant explicit link fastpathMichael Howell-0/+18
Fixes #115064
2023-08-18Add regression test for inline docKyle Lin-0/+13
2023-08-18fix `unescaped_backticks` errorKyle Lin-64/+64
2023-08-18narrow down the lint trigger constraintKyle Lin-0/+1
2023-08-18add missing deny lintKyle Lin-0/+2
2023-08-18Add check-pass tests and fix test behaviorKyle Lin-0/+4
2023-08-18Still resolving rustdoc resolution panickingKyle Lin-6/+7
2023-08-18Support Reference & ReferenceUnknown link lintKyle Lin-1/+909
2023-08-18Refactor lint from rustc to rustdocKyle Lin-74/+327
2023-08-18fix trailing whitespaceKyle Lin-2/+2
2023-08-18bless test outputKyle Lin-9/+45
2023-08-18add more testsKyle Lin-0/+8
2023-08-18Fix resolution cachingKyle Lin-1/+113
2023-08-18Add warn level lint `redundant_explicit_links`Kyle Lin-0/+6
- Currently it will panic due to the resolution's caching issue
2023-08-01Fix windows test output.Yuri Astrakhan-1/+2
2023-07-29Fix test output.Mara Bos-2/+2
2023-07-29Change default panic handler message format.Mara Bos-2/+4
2023-07-24validate `doc(masked)`Lukas Markeffsky-7/+57
2023-07-22add tests for broken links in unused doc stringsLukas Markeffsky-0/+43
2023-07-20Auto merge of #113622 - RickleAndMortimer:issue-113184-fix, r=oli-obkbors-0/+1
add links to query documentation for E0391 This PR adds links to https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for the rustc --explain E0391 and within the compiler error itself. Fixes: #113184
2023-07-19On nightly, dump ICE backtraces to diskEsteban Küber-1/+2
Implement rust-lang/compiler-team#578. When an ICE is encountered on nightly releases, the new rustc panic handler will also write the contents of the backtrace to disk. If any `delay_span_bug`s are encountered, their backtrace is also added to the file. The platform and rustc version will also be collected.
2023-07-19fix issue-110629-private-type-cycle-dyn testnxya-5/+1
2023-07-18added links as a notenxya-1/+1
2023-07-18add links to query documentation for E0391nxya-1/+1
2023-07-18added links as a notenxya-1/+6
2023-07-18add links to query documentation for E0391nxya-1/+1
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-25Rollup merge of #111152 - lukas-code:markdown-parsers-are-hard, r=GuillaumeGomezMichael Goulet-1/+25
update `pulldown-cmark` to `0.9.3` This PR updates `pulldown-cmark` to version `0.9.3`, which does two main things: * Pulls in https://github.com/raphlinus/pulldown-cmark/pull/643 to fix https://github.com/rust-lang/rust/issues/111117 * Allows parsing strikethrough with single tildes, e.g. `~foo~` -> ~foo~. This matches the [GFM spec](https://github.github.com/gfm/#strikethrough-extension-). Full changelog: https://github.com/raphlinus/pulldown-cmark/pull/646
2023-05-23Add regression test for #111189Guillaume Gomez-0/+31
2023-05-22rustdoc: add regression test for broken link due to double backticksLukas Markeffsky-1/+25
2023-05-11Fix backtrace normalization in ice-bug-report-url.rsUlrich Weigand-2/+3
This test case currently fails on s390x, and probably other platforms where the last line of a backtrace does not contain and " at <source location>" specification. The problem with the existing normalization lines // normalize-stderr-test "\s*\d{1,}: .*\n" -> "" // normalize-stderr-test "\s at .*\n" -> "" is that \s matches all whitespace, including newlines, so the first (but not second) of these regexes may merge multiple lines. Thus the output differs depending on which of these matches on the last line of a backtrace. As the whitespace used in backtraces is just normal space characters, change both regexes to just match at least one space character instead: // normalize-stderr-test " +\d{1,}: .*\n" -> "" // normalize-stderr-test " + at .*\n" -> ""