Generate docs for links to private items when passed --document-private

- Pass around document_private a lot more
- Add tests
  + Add tests for intra-doc links to private items
  + Add ignored tests for warnings in reference links
This commit is contained in:
Joshua Nelson
2020-05-30 11:35:35 -04:00
parent 6f8bec9399
commit 20552c811a
11 changed files with 78 additions and 27 deletions

View File

@@ -0,0 +1,10 @@
// check-pass
// revisions: public private
// [private]compile-flags: --document-private-items
#![cfg_attr(private, deny(intra_doc_resolution_failure))]
/// docs [DontDocMe]
//[public]~^ WARNING `[DontDocMe]` public documentation for `DocMe` links to a private item
// FIXME: for [private] we should also make sure the link was actually generated
pub struct DocMe;
struct DontDocMe;