Invoking derived default() for tuple struct declared in function produces "Expected 1 argument, found 0" #7256
Labels
A-diagnostics
diagnostics / error reporting
S-actionable
Someone could pick this issue up and work on it right now
rust-analyzer version: 0.2.449
This puts an error spanning
EvidenceVisitor::default()
which says "Expected 1 argument, found 0"Adding a second member updates the error to "Expected 2 arguments, found 0"
Changing to an explicit
impl Default for EvidenceVisitor
doesn't change the error.Changing to a unit struct or named struct makes the error disappear.
Moving the struct declaration outside the function body makes the error disappear. In the real code, I have the struct inside the function declaration because the whole function is
cfg
-gated, but the repro doesn't depend on conditional compilation.The text was updated successfully, but these errors were encountered: