parent
e4828d5b7f
commit
5f464bb7f2
2 changed files with 10 additions and 0 deletions
|
@ -96,6 +96,7 @@ crate fn should_have_doc_example(cx: &DocContext<'_>, item: &clean::Item) -> boo
|
|||
|
||||
if cx.tcx.hir().attrs(hir_id).lists(sym::doc).has_word(sym::hidden)
|
||||
|| inherits_doc_hidden(cx.tcx, hir_id)
|
||||
|| cx.tcx.hir().span(hir_id).in_derive_expansion()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -78,6 +78,15 @@ impl Clone for Struct {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/// doc
|
||||
///
|
||||
/// ```
|
||||
/// println!("hello");
|
||||
/// ```
|
||||
#[derive(Clone)]
|
||||
pub struct NiceStruct;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod foo {
|
||||
pub fn bar() {}
|
||||
|
|
Loading…
Add table
Reference in a new issue