about summary refs log tree commit diff
path: root/tests/rustdoc-ui/doctest
AgeCommit message (Collapse)AuthorLines
2024-10-30Rollup merge of #131096 - GuillaumeGomez:rm-no_unused, r=notriddle许杰友 Jieyou Xu (Joe)-0/+88
rustdoc: Remove usage of `allow(unused)` attribute on `no_run` merged doctests Fixes [#130681](https://github.com/rust-lang/rust/issues/130681). It fixes the behaviour difference with the current doctests. r? ``@notriddle``
2024-10-26rustdoc: make doctest span tweak a 2024 edition changeMichael Howell-12/+85
Fixes #132203 This is a compatibility hack, because I think the new behavior is better. When an A `include_str!` B, and B `include_str!` C, the path to C should be resolved relative to B, not A. That's how `include!` itself works, so that's how `include_str!` with should work.
2024-10-24Add regression test for #131893Guillaume Gomez-0/+31
2024-10-11Remove deprecation note in the `non_local_definitions` warningUrgau-2/+0
2024-10-01Add regression tests for #130681Guillaume Gomez-0/+88
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-28/+28
2024-09-28Add regression tests for mistyped `standalone-crate` attributeGuillaume Gomez-0/+64
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-19rustdoc: use the correct span for doctestsMichael Howell-1/+39
2024-08-13Fix commands syntax in rustdoc-ui testsGuillaume Gomez-5/+5
2024-08-13Add more merged doctests testsGuillaume Gomez-0/+21
2024-08-13Don't special-case if there is only one merged doctestGuillaume Gomez-15/+19
2024-08-13Run mergeable doctest as part of standalone doctests if there is only oneGuillaume Gomez-10/+5
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-09rustdoc: move invalid langstring test to UIMichael Howell-0/+17
2024-07-18Be more accurate about calculating `display_col` from a `BytePos`Esteban Küber-1/+1
No longer track "zero-width" chars in `SourceMap`, read directly from the line when calculating the `display_col` of a `BytePos`. Move `char_width` to `rustc_span` and use it from the emitter. This change allows the following to properly align in terminals (depending on the font, the replaced control codepoints are rendered as 1 or 2 width, on my terminal they are rendered as 1, on VSCode text they are rendered as 2): ``` error: this file contains an unclosed delimiter --> $DIR/issue-68629.rs:5:17 | LL | ␜␟ts␀![{i | -- unclosed delimiter | | | unclosed delimiter LL | ␀␀ fn rݻoa>rݻm | ^ ```
2024-07-12Make parse error suggestions verbose and fix spansEsteban Küber-1/+6
Go over all structured parser suggestions and make them verbose style. When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
2024-07-11Always use a colon in `//@ normalize-*:` headersZalathar-25/+25
2024-06-27Switch back `non_local_definitions` lint to allow-by-defaultUrgau-3/+9
as request T-lang is requesting some major changes in the lint inner workings in #126768#issuecomment-2192634762
2024-06-15Suggest standalone doctest for non-local impl defsUrgau-0/+69
2024-05-27non_local_defs: improve exception note for impl and macro_rules!Urgau-1/+0
- Remove wrong exception text for non-local macro_rules! - Simplify anonymous const exception note
2024-05-27non_local_defs: switch to more friendly primary messageUrgau-1/+1
2024-05-01Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lintUrgau-0/+30
2024-04-15Move --check-cfg documentation to stable booksUrgau-1/+1
2024-02-29Update ui testsGuillaume Gomez-20/+4
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-113/+113
2023-12-13Auto merge of #118213 - Urgau:check-cfg-diagnostics-rustc-cargo, r=petrochenkovbors-0/+2
Add more suggestions to unexpected cfg names and values This pull request adds more suggestion to unexpected cfg names and values diagnostics: - it first adds a links to the [rustc unstable book](https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html) or the [Cargo reference](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg), depending if rustc is invoked by Cargo - it secondly adds a suggestion on how to expect the cfg name or value: *excluding well known names and values* - for Cargo: it suggest using a feature or `cargo:rust-check-cfg` in build script - for rustc: it suggest using `--check-cfg` (with the correct invocation) Those diagnostics improvements are directed towards enabling users to fix the issue if the previous suggestions weren't good enough. r? `@petrochenkov`
2023-12-13Add more suggestion to unexpected cfg names and valuesUrgau-0/+2
2023-12-12Follow guidelines for lint suggestionsGuillaume Gomez-12/+24
2023-11-24Manual find replace updatesNilstrieb-1/+1
2023-11-24Bless rustdoc-ui testsNilstrieb-11/+11
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-13MCP636: Adapt check-cfg tests to the new syntaxUrgau-1/+1
2023-10-12check-cfg: update rustdoc ui check-cfg testsUrgau-1/+1
2023-08-01Fix windows test output.Yuri Astrakhan-1/+2
2023-07-29Change default panic handler message format.Mara Bos-1/+2
2023-05-05Improve check-cfg diagnostics (part 1)Urgau-1/+1
2023-04-29Move some rustdoc-ui tests to subdirectoriesjyn-0/+1189