简体   繁体   中英

How do I recognize shadowed crates in the rust documentation?

When I document my project by 'cargo doc' then it can happen that the name of my own project shadows a dependend crate which is then invisible.

So I do not see that a crate with the same name exists and this crate then keeps undocumented.

How can I tackle this problem?

The best workaround is to just avoid this situation from the beginning. Just make sure you're not shadowing any public crates names. You can check on crates.io if your desired name is available, if it's not I strongly recommend you choose a different name since if you ever want to publish it you'd have to rename it anyways.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM