about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTshepang Mbambo <tshepang@gmail.com>2025-05-22 19:37:29 +0200
committerTshepang Mbambo <hopsi@tuta.io>2025-05-22 19:37:29 +0200
commitbf90c3eb866d83e91da7bf40676836b0cde90859 (patch)
tree10932002eb7fbf20f884addabbafc32a1725d4a2
parentf499cd0000c38a538b7c81b69ed7549a90e5efd1 (diff)
downloadrust-bf90c3eb866d83e91da7bf40676836b0cde90859.tar.gz
rust-bf90c3eb866d83e91da7bf40676836b0cde90859.zip
~? annotation type is special
It does not do any line matching, so it should be separated from the other types.
-rw-r--r--src/doc/rustc-dev-guide/src/tests/ui.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/ui.md b/src/doc/rustc-dev-guide/src/tests/ui.md
index 721d20b65c5..3402838da87 100644
--- a/src/doc/rustc-dev-guide/src/tests/ui.md
+++ b/src/doc/rustc-dev-guide/src/tests/ui.md
@@ -192,7 +192,7 @@ They have several forms, but generally are a comment with the diagnostic level
 to write out the entire message, just make sure to include the important part of
 the message to make it self-documenting.
 
-The error annotation needs to match with the line of the diagnostic. There are
+Most error annotations need to match with the line of the diagnostic. There are
 several ways to match the message with the line (see the examples below):
 
 * `~`: Associates the error level and message with the *current* line
@@ -205,9 +205,6 @@ several ways to match the message with the line (see the examples below):
 * `~v`: Associates the error level and message with the *next* error
   annotation line. Each symbol (`v`) that you add adds a line to this, so `~vvv`
   is three lines below the error annotation line.
-* `~?`: Used to match error levels and messages with errors not having line
-  information. These can be placed on any line in the test file, but are
-  conventionally placed at the end.
 
 Example:
 
@@ -222,6 +219,10 @@ The space character between `//~` (or other variants) and the subsequent text is
 negligible (i.e. there is no semantic difference between `//~ ERROR` and
 `//~ERROR` although the former is more common in the codebase).
 
+`~? <diagnostic kind>` (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.
+
 ### Error annotation examples
 
 Here are examples of error annotations on different lines of UI test source.