We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using anyhow::bail! like this (which is a really common use case):
anyhow::bail!
fn cool_function(i: i32) -> Result<i32, anyhow::Error>{ match i { 1 => Ok(1), 2 => Ok(2), _ => anyhow::bail!("out of range"), } }
the nightly rust-analyzer gives this diagnostic warning:
replace <expr>; with <expr> [needless_return]
which is expected because bail! expands roughly to return Err(...), which obviously triggers the above error.
return Err(...)
This only happens with the nightly rust-analyzer (rust-analyzer 0.4.1863-standalone) and I don't get this warning with clippy.
Original issue in anyhow repo: dtolnay/anyhow#351
The text was updated successfully, but these errors were encountered:
676455f
Successfully merging a pull request may close this issue.
When using
anyhow::bail!
like this (which is a really common use case):the nightly rust-analyzer gives this diagnostic warning:
which is expected because bail! expands roughly to
return Err(...)
, which obviously triggers the above error.This only happens with the nightly rust-analyzer (rust-analyzer 0.4.1863-standalone) and I don't get this warning with clippy.
Original issue in anyhow repo: dtolnay/anyhow#351
The text was updated successfully, but these errors were encountered: