From 4c0d7c01705ea872dbc9e061a4d7148faa37f354 Mon Sep 17 00:00:00 2001 From: Oneirical Date: Tue, 22 Jul 2025 21:42:50 -0400 Subject: [PATCH 1/2] Rename tests/ui/SUMMARY.md and update rustc dev guide on error-pattern --- src/tests/ui.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/ui.md b/src/tests/ui.md index 9bfc60e08..b1feef9ed 100644 --- a/src/tests/ui.md +++ b/src/tests/ui.md @@ -309,7 +309,8 @@ fn main((ؼ Use `//~?` to match an error without line information. `//~?` is precise and will not match errors if their line information is available. -It should be preferred to using `error-pattern`, which is imprecise and non-exhaustive. +For tests wishing to match against compiler diagnostics, error annotations should +be preferred over //@ error-pattern, //@ error-pattern is imprecise and non-exhaustive. ```rust,ignore //@ compile-flags: --print yyyy @@ -347,8 +348,6 @@ fn main() { } ``` -Use of `error-pattern` is not recommended in general. - For strict testing of compile time output, try to use the line annotations `//~` as much as possible, including `//~?` annotations for diagnostics without spans. @@ -359,7 +358,8 @@ Some of the compiler messages can stay uncovered by annotations in this mode. For checking runtime output, `//@ check-run-results` may be preferable. -Only use `error-pattern` if none of the above works. +Only use `error-pattern` if none of the above works, such as when finding a +specific string pattern in a runtime panic output. Line annotations `//~` and `error-pattern` are compatible and can be used in the same test. From 3a02592e21fba8667180ae7545d541925cf5171d Mon Sep 17 00:00:00 2001 From: The rustc-josh-sync Cronjob Bot Date: Mon, 28 Jul 2025 04:18:33 +0000 Subject: [PATCH 2/2] Prepare for merging from rust-lang/rust This updates the rust-version file to 2b5e239c6b86cde974b0ef0f8e23754fb08ff3c5. --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index ce9f984e6..b631041b6 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -efd420c770bb179537c01063e98cb6990c439654 +2b5e239c6b86cde974b0ef0f8e23754fb08ff3c5