aboutsummaryrefslogtreecommitdiff
path: root/docs/user/generated_diagnostic.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user/generated_diagnostic.adoc')
-rw-r--r--docs/user/generated_diagnostic.adoc105
1 files changed, 105 insertions, 0 deletions
diff --git a/docs/user/generated_diagnostic.adoc b/docs/user/generated_diagnostic.adoc
new file mode 100644
index 000000000..34c4f98a3
--- /dev/null
+++ b/docs/user/generated_diagnostic.adoc
@@ -0,0 +1,105 @@
1//Generated file, do not edit by hand, see `xtask/src/codegen`
2=== break-outside-of-loop
3**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L219[diagnostics.rs]
4
5This diagnostic is triggered if `break` keyword is used outside of a loop.
6
7
8=== inactive-code
9**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L98[diagnostics.rs]
10
11This diagnostic is shown for code with inactive `#[cfg]` attributes.
12
13
14=== incorrect-ident-case
15**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L319[diagnostics.rs]
16
17This diagnostic is triggered if item name doesn't follow https://doc.rust-lang.org/1.0.0/style/style/naming/README.html[Rust naming convention].
18
19
20=== mismatched-arg-count
21**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L267[diagnostics.rs]
22
23This diagnostic is triggered if function is invoked with an incorrect amount of arguments.
24
25
26=== missing-match-arm
27**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L162[diagnostics.rs]
28
29This diagnostic is triggered if `match` block is missing one or more match arms.
30
31
32=== missing-ok-in-tail-expr
33**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L187[diagnostics.rs]
34
35This diagnostic is triggered if block that should return `Result` returns a value not wrapped in `Ok`.
36
37Example:
38
39```rust
40fn foo() -> Result<u8, ()> {
41 10
42}
43```
44
45
46=== missing-pat-fields
47**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L113[diagnostics.rs]
48
49This diagnostic is triggered if pattern lacks some fields that exist in the corresponding structure.
50
51Example:
52
53```rust
54struct A { a: u8, b: u8 }
55
56let a = A { a: 10, b: 20 };
57
58if let A { a } = a {
59 // ...
60}
61```
62
63
64=== missing-structure-fields
65**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L66[diagnostics.rs]
66
67This diagnostic is triggered if record lacks some fields that exist in the corresponding structure.
68
69Example:
70
71```rust
72struct A { a: u8, b: u8 }
73
74let a = A { a: 10 };
75```
76
77
78=== missing-unsafe
79**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L243[diagnostics.rs]
80
81This diagnostic is triggered if operation marked as `unsafe` is used outside of `unsafe` function or block.
82
83
84=== no-such-field
85**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L39[diagnostics.rs]
86
87This diagnostic is triggered if created structure does not have field provided in record.
88
89
90=== unresolved-extern-crate
91**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L43[diagnostics.rs]
92
93This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
94
95
96=== unresolved-import
97**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L67[diagnostics.rs]
98
99This diagnostic is triggered if rust-analyzer is unable to discover imported module.
100
101
102=== unresolved-module
103**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L18[diagnostics.rs]
104
105This diagnostic is triggered if rust-analyzer is unable to discover referred module.