Closed
Description
Given the following code: playground link
use serde::{Serialize, IgnoredAny};
The current output is:
error[E0432]: unresolved import `serde::IgnoredAny`
--> src/lib.rs:1:24
|
1 | use serde::{Serialize, IgnoredAny};
| ^^^^^^^^^^ no `IgnoredAny` in the root
|
help: consider importing this struct instead
|
1 | use serde::{Serialize, serde::de::IgnoredAny;
| ~~~~~~~~~~~~~~~~~~~~~~
The help message is wrong for two reasons:
- The closing bracket is missing
- The crate name (
serde
) is repeated in the path, so the suggested code would importserde::serde::de::IgnoredAny
instead ofserde::de::IgnoredAny
.
Ideally the output should look like:
help: consider importing this struct instead
|
1 | use serde::{Serialize, de::IgnoredAny};
| ~~~~~~~~~~~~~~
Note that the help message was only added recently, so this bug exists only on beta and nightly at the moment.