Rust editor doesn't show errors
See original GitHub issueI have the following rust code in the editor:
fn main() {
let a = "Foo";
println!("Hello, world!" + a);
}
However, trying to run this from the IDE I do get:
Compiling new_rust_project v0.1.0 (/home/jreimann/Development/workspace-rust/new_rust_project)
error: format argument must be a string literal
--> src/main.rs:3:14
|
3 | println!("Hello, world!" + a);
| ^^^^^^^^^^^^^^^^^^^
help: you might be missing a string literal to format with
|
3 | println!("{}", "Hello, world!" + a);
| ^^^^^
error: aborting due to previous error
error: Could not compile `new_rust_project`.
To learn more, run the command again with --verbose.
Also see:
My expectations would be:
- The editor shows the same errors, at least when I save the file, or after it got compiled
- Locations (file + line number) in the log output can be clicked in, to open the file in the IDE
- I see some error markers in the project explorer
Issue Analytics
- State:
- Created 5 years ago
- Comments:42 (22 by maintainers)
Top Results From Across the Web
Rust-analyzer doesn't show cargo check/compilation errors ...
Hello, I'm having an issue using rust-analyzer with a rust-project.json file: my project doesn't show compilation errors/the output of cargo ...
Read more >CLion Failed to detect error in Rust?
A temporary solution is to use an external linter. To enable it, select `Run external linter to analyze code on the fly` from...
Read more >Code Navigation in Visual Studio Code
The editor has a navigation bar above its contents called Breadcrumbs. It shows the current location and allows you to quickly navigate between...
Read more >Vscode doesnt show errors on the IDE like other IDEs such as ...
Looking at vscode however it seems to me it doesn't detect subtle errors such as when I have a function that would return...
Read more >User Manual - rust-analyzer
The LSP allows various code editors, like VS Code, Emacs or Vim, to implement ... Note that installing via xtask install does not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just tested this with 2019-06 RC1 and it works now! Thanks!
Now I can see my code is full of issues 😁
I was having this same problem. The RLS didn’t seem to be working, but it worked when I would start it from the terminal. However, after looking at this comment, I ran
cargo clean
on each of the projects. After that, I started Eclipse from the UI Desktop and when it started up, the RLS worked as usual.Try running
cargo clean
on all of your projects.