Unnamed repository; edit this file 'description' to name the repository.
Add troubleshooting FAQ to the book
And one frequently asked question.
| -rw-r--r-- | docs/book/src/SUMMARY.md | 1 | ||||
| -rw-r--r-- | docs/book/src/faq.md | 7 | ||||
| -rw-r--r-- | docs/book/src/troubleshooting.md | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index 1f211a97d7..dffdae94a6 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -6,6 +6,7 @@ - [rust-analyzer Binary](rust_analyzer_binary.md) - [Other Editors](other_editors.md) - [Troubleshooting](troubleshooting.md) + - [FAQ](faq.md) - [Configuration](configuration.md) - [Non-Cargo Based Projects](non_cargo_based_projects.md) - [Security](security.md) diff --git a/docs/book/src/faq.md b/docs/book/src/faq.md new file mode 100644 index 0000000000..c872033090 --- /dev/null +++ b/docs/book/src/faq.md @@ -0,0 +1,7 @@ +# Troubleshooting FAQ + +### I see a warning "Variable `None` should have snake_case name, e.g. `none`" + +rust-analyzer fails to resolve `None`, and thinks you are binding to a variable +named `None`. That's usually a sign of a corrupted sysroot. Try removing and re-installing +it: `rustup component remove rust-src` then `rustup component install rust-src`. diff --git a/docs/book/src/troubleshooting.md b/docs/book/src/troubleshooting.md index 1b2841421a..3f7caf0db4 100644 --- a/docs/book/src/troubleshooting.md +++ b/docs/book/src/troubleshooting.md @@ -1,5 +1,9 @@ # Troubleshooting +First, search the [troubleshooting FAQ](troubleshooting/faq.html). If +your problem appears there (and the proposed solution works for you), +great! Otherwise, read on. + Start with looking at the rust-analyzer version. Try **rust-analyzer: Show RA Version** in VS Code (using **Command Palette** feature typically activated by Ctrl+Shift+P) or `rust-analyzer --version` in the |