aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/user/generated_diagnostic.adoc119
-rw-r--r--docs/user/manual.adoc19
2 files changed, 19 insertions, 119 deletions
diff --git a/docs/user/generated_diagnostic.adoc b/docs/user/generated_diagnostic.adoc
deleted file mode 100644
index ec8581a03..000000000
--- a/docs/user/generated_diagnostic.adoc
+++ /dev/null
@@ -1,119 +0,0 @@
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=== macro-error
21**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L167[diagnostics.rs]
22
23This diagnostic is shown for macro expansion errors.
24
25
26=== mismatched-arg-count
27**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L267[diagnostics.rs]
28
29This diagnostic is triggered if function is invoked with an incorrect amount of arguments.
30
31
32=== missing-match-arm
33**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L162[diagnostics.rs]
34
35This diagnostic is triggered if `match` block is missing one or more match arms.
36
37
38=== missing-ok-in-tail-expr
39**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L187[diagnostics.rs]
40
41This diagnostic is triggered if block that should return `Result` returns a value not wrapped in `Ok`.
42
43Example:
44
45```rust
46fn foo() -> Result<u8, ()> {
47 10
48}
49```
50
51
52=== missing-pat-fields
53**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L113[diagnostics.rs]
54
55This diagnostic is triggered if pattern lacks some fields that exist in the corresponding structure.
56
57Example:
58
59```rust
60struct A { a: u8, b: u8 }
61
62let a = A { a: 10, b: 20 };
63
64if let A { a } = a {
65 // ...
66}
67```
68
69
70=== missing-structure-fields
71**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L66[diagnostics.rs]
72
73This diagnostic is triggered if record lacks some fields that exist in the corresponding structure.
74
75Example:
76
77```rust
78struct A { a: u8, b: u8 }
79
80let a = A { a: 10 };
81```
82
83
84=== missing-unsafe
85**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L243[diagnostics.rs]
86
87This diagnostic is triggered if operation marked as `unsafe` is used outside of `unsafe` function or block.
88
89
90=== no-such-field
91**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L39[diagnostics.rs]
92
93This diagnostic is triggered if created structure does not have field provided in record.
94
95
96=== unresolved-extern-crate
97**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L43[diagnostics.rs]
98
99This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
100
101
102=== unresolved-import
103**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L67[diagnostics.rs]
104
105This diagnostic is triggered if rust-analyzer is unable to discover imported module.
106
107
108=== unresolved-module
109**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L18[diagnostics.rs]
110
111This diagnostic is triggered if rust-analyzer is unable to discover referred module.
112
113
114=== unresolved-proc-macro
115**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L131[diagnostics.rs]
116
117This diagnostic is shown when a procedural macro can not be found. This usually means that
118procedural macro support is simply disabled (and hence is only a weak hint instead of an error),
119but can also indicate project setup problems.
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 9d4f52a93..1ec6e81bb 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -95,6 +95,23 @@ If you don't want to be asked for `Download now` every day when the new nightly
95 95
96NOTE: Nightly extension should **only** be installed via the `Download now` action from VS Code. 96NOTE: Nightly extension should **only** be installed via the `Download now` action from VS Code.
97 97
98==== Manual installation
99
100Alternatively, procure both `rust-analyzer.vsix` and your platform's matching `rust-analyzer-{platform}`, for example from the
101https://github.com/rust-analyzer/rust-analyzer/releases[releases] page.
102
103Install the extension with the `Extensions: Install from VSIX` command within VS Code, or from the command line via:
104[source]
105----
106$ code --install-extension /path/to/rust-analyzer.vsix
107----
108
109Copy the `rust-analyzer-{platform}` binary anywhere, then add the path to your settings.json, for example:
110[source,json]
111----
112{ "rust-analyzer.serverPath": "~/.local/bin/rust-analyzer-linux" }
113----
114
98==== Building From Source 115==== Building From Source
99 116
100Alternatively, both the server and the Code plugin can be installed from source: 117Alternatively, both the server and the Code plugin can be installed from source:
@@ -272,6 +289,8 @@ GNOME Builder 3.37.1 and newer has native `rust-analyzer` support. If the LSP bi
272 289
273== Configuration 290== Configuration
274 291
292**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs]
293
275rust-analyzer is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. 294rust-analyzer is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files.
276Please consult your editor's documentation to learn how to configure LSP servers. 295Please consult your editor's documentation to learn how to configure LSP servers.
277 296