Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So here are some things the book chapter misses that are source of confusion elsewhere in this thread

- `extern crate` is logically a crate-internal magic `pub mod` or `pub use`

- You should usually put your `extern crate`s in the crate root

- Putting these two together, you can refer to crates as if they were toplevel modules.

This is one of the very common confusions I've seen.



Mind opening an issue with this in it? <3





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: