Closed shpazk closed 5 years ago
While cargo check
seems to output correct error message, flycheck-rust.el
at master
branch doesn't show the correct error messages!
Can you get a screenshot of what the error looks like? Or provide a minimal example of code with which I can reproduce?
Also, please state your rustc
and cargo
versions.
Thank you for your early response!
I tried rustc
1.32.0-nightly and cargo
1.33.0-nightly.
This is how the error looks like. Here is a screenshot of wrong error message.
Thanks!
Can you show the output of cargo check
for your project? Please also report your flycheck version and flycheck-rust version.
Here's the error message that cargo check
provides:
hello λ cargo check
Checking hello v0.1.0 (/home/shpark/src/rust/hello)
error[E0425]: cannot find value `error` in this scope
--> src/main.rs:3:5
|
3 | error
| ^^^^^ not found in this scope
error: aborting due to previous error
For more information about this error, try `rustc --explain E0425`.
error: Could not compile `hello`.
To learn more, run the command again with --verbose.
And the version of flycheck
is 31 and the version of flycheck-rust
is 20180904.1117.
Found on M-x package-list-packages
.
Thanks!
@shpazk Can you report the output of flycheck-verify-setup
in that buffer?
I cannot reproduce your issue with the latest flycheck/flycheck-rust versions from MELPA.
@fmdkdd This is the result of flycheck-verify-setup
from the buffer. Thanks for paying attention to the issue!
Syntax checkers for buffer main.rs in rust-mode:
rust-cargo
- may enable: yes
- predicate: t
- executable: Found at /home/shpark/.cargo/bin/cargo
- Cargo.toml: Found
- Crate type: bin
- Binary name: hello-world
rust
- may enable: yes
- predicate: t
- executable: Found at /home/shpark/.cargo/bin/rustc
Flycheck Mode is enabled. Use C-u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 31
Emacs version: 25.2.2
System: x86_64-pc-linux-gnu
Window system: nil
Ooooh. You are using the stable Flycheck version from MELPA stable. I'm pretty sure current versions of Rust are incompatible with that one.
We are overdue for a release, but there are still some new features that needs tuning before we land that. I suggest you use the latest Flycheck version, not the stable one. We are very careful about not pushing breaking updates to master, don't worry.
Whoa. It seems to work with the flycheck version from MELPA. (without stable)
Thanks!
Happy hacking!
Hi
flycheck-rust on my Emacs 25.2.2 doesn't provide rich description of the error.
It always reports the first token of the code as the point of failure (with highlights), and error message always looks like this.
How can I get more precise know where the error is happening, and get more helpful error message?
My configuration looks like:
Thanks!