The link to tokio::main was relative to tokio_macros crate in the source directory. This is why it worked in local build of documentation and not in doc.rs. Refs: #1473