From ffd9a44bbc0d2ebdbe9ab15b655c391cf5ae5038 Mon Sep 17 00:00:00 2001 From: Yutaro Ohno Date: Wed, 20 Nov 2024 17:21:27 +0900 Subject: [PATCH] Make `Diag` a clickable link in Suggestion section (#2140) --- src/diagnostics.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/diagnostics.md b/src/diagnostics.md index ddcaa8f33..71f58b482 100644 --- a/src/diagnostics.md +++ b/src/diagnostics.md @@ -387,10 +387,11 @@ example-example-error = oh no! this is an error! In addition to telling the user exactly _why_ their code is wrong, it's oftentimes furthermore possible to tell them how to fix it. To this end, -`Diag` offers a structured suggestions API, which formats code +[`Diag`][diag] offers a structured suggestions API, which formats code suggestions pleasingly in the terminal, or (when the `--error-format json` flag is passed) as JSON for consumption by tools like [`rustfix`][rustfix]. +[diag]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/struct.Diag.html [rustfix]: https://github.com/rust-lang/rustfix Not all suggestions should be applied mechanically, they have a degree of