Unused import warning in a test could suggest #[cfg(test)] #88138
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: Playground link
The current output is:
However, the import is actually required for the test. It would be helpful if the compiler suggested adding
#[cfg(test)]
tomod test
to fix the issue. (Thanks to pie_flavor on Discord for pointing out that that's the issue :))The text was updated successfully, but these errors were encountered: