From 94e0753504af5805ad79bd6cbe9f3cec6ebdf858 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 4 Jun 2025 00:26:47 +0200 Subject: [PATCH] expand meaning of ~? diagnostic annotation --- src/doc/rustc-dev-guide/src/tests/ui.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/doc/rustc-dev-guide/src/tests/ui.md b/src/doc/rustc-dev-guide/src/tests/ui.md index 3402838da878..25d3efdbb826 100644 --- a/src/doc/rustc-dev-guide/src/tests/ui.md +++ b/src/doc/rustc-dev-guide/src/tests/ui.md @@ -220,8 +220,12 @@ negligible (i.e. there is no semantic difference between `//~ ERROR` and `//~ERROR` although the former is more common in the codebase). `~? ` (example being `~? ERROR`) -is used to match diagnostics without line information. -These can be placed on any line in the test file, but are conventionally placed at the end. +is used to match diagnostics _without_ line info at all, +or where the line info is outside the main test file[^main test file]. +These annotations can be placed on any line in the test file. + +[^main test file]: This is a file that has the `~?` annotations, +as distinct from aux files, or sources that we have no control over. ### Error annotation examples