summaryrefslogtreecommitdiff
path: root/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs
blob: b98d1e4167cedce5af887cf41bd3f3fa058243bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// compile-flags: --document-private-items
#![feature(no_core)]
#![no_core]

pub struct Foo;

/// impl Foo priv
impl Foo {
    fn baz() {}
}
// @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'


/// impl Foo pub
impl Foo {
    pub fn qux() {}
}
// @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'


/// impl Foo hidden
impl Foo {
    #[doc(hidden)]
    pub fn __quazl(){}
}
// FIXME(#111564): Is this the right behaviour?
// @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'