rust/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
2023-05-15 17:48:48 +00:00

29 lines
579 B
Rust

// compile-flags: --document-hidden-items
#![feature(no_core)]
#![no_core]
pub struct Foo;
/// impl Foo priv
impl Foo {
fn baz() {}
}
// FIXME(#111564): Is this the right behaviour?
// @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"'