aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/debugging.md2
-rw-r--r--docs/user/generated_diagnostic.adoc18
-rw-r--r--docs/user/manual.adoc7
3 files changed, 17 insertions, 10 deletions
diff --git a/docs/dev/debugging.md b/docs/dev/debugging.md
index 59a83f7d7..8c48fd5a1 100644
--- a/docs/dev/debugging.md
+++ b/docs/dev/debugging.md
@@ -53,7 +53,7 @@ To apply changes to an already running debug process, press <kbd>Ctrl+Shift+P</k
53 53
54- A list of running processes should appear. Select the `rust-analyzer` from this repo. 54- A list of running processes should appear. Select the `rust-analyzer` from this repo.
55 55
56- Navigate to `crates/rust-analyzer/src/main_loop.rs` and add a breakpoint to the `on_task` function. 56- Navigate to `crates/rust-analyzer/src/main_loop.rs` and add a breakpoint to the `on_request` function.
57 57
58- Go back to the `[Extension Development Host]` instance and hover over a Rust variable and your breakpoint should hit. 58- Go back to the `[Extension Development Host]` instance and hover over a Rust variable and your breakpoint should hit.
59 59
diff --git a/docs/user/generated_diagnostic.adoc b/docs/user/generated_diagnostic.adoc
index ec45d0c2b..34c4f98a3 100644
--- a/docs/user/generated_diagnostic.adoc
+++ b/docs/user/generated_diagnostic.adoc
@@ -5,6 +5,12 @@
5This diagnostic is triggered if `break` keyword is used outside of a loop. 5This diagnostic is triggered if `break` keyword is used outside of a loop.
6 6
7 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
8=== incorrect-ident-case 14=== incorrect-ident-case
9**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L319[diagnostics.rs] 15**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L319[diagnostics.rs]
10 16
@@ -81,25 +87,19 @@ This diagnostic is triggered if operation marked as `unsafe` is used outside of
81This diagnostic is triggered if created structure does not have field provided in record. 87This diagnostic is triggered if created structure does not have field provided in record.
82 88
83 89
84=== unconfigured-code
85**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L90[diagnostics.rs]
86
87This diagnostic is shown for code with inactive `#[cfg]` attributes.
88
89
90=== unresolved-extern-crate 90=== unresolved-extern-crate
91**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L35[diagnostics.rs] 91**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L43[diagnostics.rs]
92 92
93This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate. 93This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
94 94
95 95
96=== unresolved-import 96=== unresolved-import
97**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L59[diagnostics.rs] 97**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L67[diagnostics.rs]
98 98
99This diagnostic is triggered if rust-analyzer is unable to discover imported module. 99This diagnostic is triggered if rust-analyzer is unable to discover imported module.
100 100
101 101
102=== unresolved-module 102=== unresolved-module
103**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L10[diagnostics.rs] 103**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L18[diagnostics.rs]
104 104
105This diagnostic is triggered if rust-analyzer is unable to discover referred module. 105This diagnostic is triggered if rust-analyzer is unable to discover referred module.
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 7e8adcdb7..b9d907a4a 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -366,6 +366,13 @@ Cursor position or selection is signified by `┃` character.
366 366
367include::./generated_assists.adoc[] 367include::./generated_assists.adoc[]
368 368
369== Diagnostics
370
371While most errors and warnings provided by rust-analyzer come from the `cargo check` integration, there's a growing number of diagnostics implemented using rust-analyzer's own analysis.
372These diagnostics don't respect `#[allow]` or `#[deny]` attributes yet, but can be turned off using the `rust-analyzer.diagnostics.enable`, `rust-analyzer.diagnostics.enableExperimental` or `rust-analyzer.diagnostics.disabled` settings.
373
374include::./generated_diagnostic.adoc[]
375
369== Editor Features 376== Editor Features
370=== VS Code 377=== VS Code
371 378