提交 72a180e1 编写于 作者: C Camelid

rustdoc: Record crate name instead of using `None`

上级 2287a882
......@@ -76,7 +76,7 @@ fn store_path(&mut self, did: DefId) {
&Spanned { span: rustc_span::DUMMY_SP, node: hir::VisibilityKind::Public },
hir::CRATE_HIR_ID,
&krate.item.module,
None,
Some(self.cx.tcx.crate_name),
);
top_level_module.is_crate = true;
// Attach the crate's exported macros to the top-level module.
......
// check-pass
//! [my_module]
//~^ WARN public documentation for `private_from_crate_level` links to private item `my_module`
mod my_module {}
warning: public documentation for `private_from_crate_level` links to private item `my_module`
--> $DIR/private-from-crate-level.rs:3:6
|
LL | //! [my_module]
| ^^^^^^^^^ this item is private
|
= note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
= note: this link will resolve properly if you pass `--document-private-items`
warning: 1 warning emitted
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册