Skip to content

rust-analyzer shows warning as an error #19091

Closed Answered by lnicola
Tahinli asked this question in Q&A
Discussion options

You must be logged in to vote

You've configured rust-analyzer to run cargo clippy instead of cargo check. If you try it yourself (in the terminal), you'll get the same error:

error: this loop never actually loops
 --> src/main.rs:5:5
  |
5 | /     for item in buf {
6 | |         match item {
7 | |             _ => return,
8 | |         }
9 | |     }
  | |_____^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#never_loop
  = note: `#[deny(clippy::never_loop)]` on by default

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Tahinli
Comment options

Answer selected by lnicola
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants