rust/src/test/rustdoc-ui/intra-links-private.rs
Dennis Hamester ed53de029c rustdoc: Always warn when linking from public to private items
Change the logic such that linking from a public to a private item always
triggers intra_doc_link_resolution_failure. Previously, the warning was
not emitted when --document-private-items is passed.

Also don't rely anymore on the item's visibility, which would falsely trigger
the lint now that the check for --document-private-items is gone.
2020-07-22 21:36:30 +02:00

9 lines
314 B
Rust

// check-pass
// revisions: public private
// [private]compile-flags: --document-private-items
/// docs [DontDocMe]
//~^ WARNING public documentation for `DocMe` links to private item `DontDocMe`
// FIXME: for [private] we should also make sure the link was actually generated
pub struct DocMe;
struct DontDocMe;