-
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
Sometimes RA reports errors that rustc
doesn't agree exist
#18542
Comments
Can you post a screenshot of the error? r-a has its own diagnostics, which sometimes have false positives. It happens with |
Yeah, given the bounds on that function, I'm not really surprised. Adding explicit type annotations usually works around this. |
uh, where? to the closure? |
Maybe, or to what |
the type of
|
Try Go to definitions on those methods in the chain, one will probably be from the wrong trait. |
I didn't write the |
Ouch, we're so slow on that file. The problem is on Explicitly choosing the trait fixes the false positive: let x = Parser::map(
kw_fn_p().ignore_then(name).then(args).then(fn_body),
|((name, arguments), statements)| Function { name, arguments, statements },
)
.labelled("function")
.as_context(); |
Lately, in various places in my project I get errors like
but the thing is: there's not a wrong number of arguments. the project builds with
cargo build
and runs withcargo run
and even shows correct output. So why the heck is RA telling me about fake errors. I thought it was something to do with like, bad cached data or something, but even after deleting the target/ directory the same problem happened a few days later.rust-analyzer
extensionThe text was updated successfully, but these errors were encountered: