-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
Incorrect replace return <expr>; with <expr>
diagnostic
#16566
Comments
@rustbot claim |
Is this really fixed? It shows up in the macro invocation in this MWE with 0.3.1860-standalone (Update: and 0.3.1868-standalone): #[tokio::main]
async fn main() {} |
I'm seeing it as well using if something {
Ok(value)
} else {
bail!("Something broke")
} |
I get the same error, even with an empty main. |
I get the same error on my unpublished codebase where all the possible cases of this hint have been solved and only the required |
minor: Mark remove_unnecessary_else as experimental cc #16566 (comment) #16628 There seem to be some leftover issues with this, additionally its a style lint so it's not too nice to see for some people. We should flesh out our diagnostics stuff before adding more style lints I think
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Hey, I still get the same error. Is there any update? |
Issue does not seem to be fixed. Seeing the issue on Neovim on the latest stable build of Rust + rust_analyzer |
Same here. Issue just appeared for me actually. Tried on Zed and Helix, not that it should matter. |
The commit marking the diagnostic as experimental will be included in today's release. |
Indeed, it's fixed. Thanks whoever contributed that 🍻 |
rust-analyzer/crates/mbe/src/expander/matcher.rs
Line 184 in 1e6cef9
The transformation here is is not valid so the diagnostic shouldnt' trigger
The text was updated successfully, but these errors were encountered: