I can't get the expected error information with using analysis.diagnostic()
in rust_analyzer api.
#15599
-
Suppose I have the source file, which has the following code:
then the method
then the method |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The reason for that is that we haven't implemented a diagnostic for unresolved paths yet. |
Beta Was this translation helpful? Give feedback.
-
If I use the latter code in vscode, there will be an indication of error. Does this indication not come from diagnostic? |
Beta Was this translation helpful? Give feedback.
That one probably comes from us invoking
cargo check
on save which is just the rust compiler's diagnostic being shown. The diagnostics function you are calling here only contains the rust-analyzer native diagnostics.