Skip to content

Commit 70966e5

Browse files
xFrednetjyn514
authored andcommitted
Some minor adjustments to the diagnostic documentation
1 parent f3fb373 commit 70966e5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: src/diagnostics.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ LL | more code
2626
| ^^^^
2727
```
2828

29-
- Description (`error`, `warning`, etc.).
29+
- Level (`error`, `warning`, etc.). It indicates the severity of the message.
30+
(See [diagnostic levels](#diagnostic-levels))
3031
- Code (for example, for "mismatched types", it is `E0308`). It helps
3132
users get more information about the current error through an extended
32-
description of the problem in the error code index.
33+
description of the problem in the error code index. Diagnostics created
34+
by lints don't have a code in the emitted message.
3335
- Message. It is the main description of the problem. It should be general and
3436
able to stand on its own, so that it can make sense even in isolation.
3537
- Diagnostic window. This contains several things:
@@ -61,7 +63,11 @@ error: the fobrulator needs to be krontrificated
6163
```
6264

6365
When code or an identifier must appear in a message or label, it should be
64-
surrounded with backticks: `` `foo.bar` ``.
66+
surrounded with backticks:
67+
68+
```txt
69+
error: the identifier `foo.bar` is invalid
70+
```
6571

6672
### Error explanations
6773

0 commit comments

Comments
 (0)