Tokio not compiling?

I'm trying to publish my library libium but I keep getting this error when it compiles tokio 1.18.1

Compiling tokio v1.18.1
error[E0432]: unresolved import `self::read_dir::read_dir`
  --> /Users/ilesh/.cargo/registry/src/
55 | pub use self::read_dir::{read_dir, DirEntry, ReadDir};
   |                          ^^^^^^^^
   |                          |
   |                          no `read_dir` in `fs::read_dir`
   |                          help: a similar name exists in the module: `wread_dir`

I do have the fs feature enabled, I did try cargo clean, and I'm on macOS 12.3

Post the full error.

Apologies! My laptop was refusing to connect to the internet I had to type out the initial post on my phone

Did you modify the cached version of Tokio in your registry? Try deleting the


folder and running it again.

1 Like

Huh yeah that fixed it. The thing is I never edit anything in the cache so I never thought to redownload the registry. I'm still not sure how this happened, probably opened the file then typed something unintentionally

Probably editor click though to the source?

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.