2020-12-25 17:38:46 -06:00
|
|
|
//@ compile-flags: --document-private-items
|
|
|
|
|
|
|
|
#![crate_name = "foo"]
|
2023-04-29 15:19:57 -05:00
|
|
|
#![feature(inherent_associated_types)]
|
|
|
|
#![allow(incomplete_features)]
|
2020-12-25 17:38:46 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ !has 'foo/index.html' '//a[@href="struct.FooPublic.html"]/..' 'FooPublic 🔒'
|
|
|
|
//@ has 'foo/struct.FooPublic.html' '//pre' 'pub struct FooPublic'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub struct FooPublic;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html' '//a[@href="struct.FooJustCrate.html"]/..' 'FooJustCrate 🔒'
|
|
|
|
//@ has 'foo/struct.FooJustCrate.html' '//pre' 'pub(crate) struct FooJustCrate'
|
2022-05-20 20:06:44 -05:00
|
|
|
pub(crate) struct FooJustCrate;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html' '//a[@href="struct.FooPubCrate.html"]/..' 'FooPubCrate 🔒'
|
|
|
|
//@ has 'foo/struct.FooPubCrate.html' '//pre' 'pub(crate) struct FooPubCrate'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(crate) struct FooPubCrate;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html' '//a[@href="struct.FooSelf.html"]/..' 'FooSelf 🔒'
|
|
|
|
//@ has 'foo/struct.FooSelf.html' '//pre' 'pub(crate) struct FooSelf'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(self) struct FooSelf;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html' '//a[@href="struct.FooInSelf.html"]/..' 'FooInSelf 🔒'
|
|
|
|
//@ has 'foo/struct.FooInSelf.html' '//pre' 'pub(crate) struct FooInSelf'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(in self) struct FooInSelf;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html' '//a[@href="struct.FooPriv.html"]/..' 'FooPriv 🔒'
|
|
|
|
//@ has 'foo/struct.FooPriv.html' '//pre' 'pub(crate) struct FooPriv'
|
2020-12-25 18:27:56 -06:00
|
|
|
struct FooPriv;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ !has 'foo/index.html' '//a[@href="pub_mod/index.html"]/..' 'pub_mod 🔒'
|
2022-03-21 05:40:25 -05:00
|
|
|
pub mod pub_mod {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html' '//a[@href="pub_crate_mod/index.html"]/..' 'pub_crate_mod 🔒'
|
2022-03-21 05:40:25 -05:00
|
|
|
pub(crate) mod pub_crate_mod {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html' '//a[@href="a/index.html"]/..' 'a 🔒'
|
2020-12-25 18:27:56 -06:00
|
|
|
mod a {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/index.html' '//a[@href="struct.FooASuper.html"]/..' 'FooASuper 🔒'
|
|
|
|
//@ has 'foo/a/struct.FooASuper.html' '//pre' 'pub(crate) struct FooASuper'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(super) struct FooASuper;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/index.html' '//a[@href="struct.FooAInSuper.html"]/..' 'FooAInSuper 🔒'
|
|
|
|
//@ has 'foo/a/struct.FooAInSuper.html' '//pre' 'pub(crate) struct FooAInSuper'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(in super) struct FooAInSuper;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/index.html' '//a[@href="struct.FooAInA.html"]/..' 'FooAInA 🔒'
|
|
|
|
//@ has 'foo/a/struct.FooAInA.html' '//pre' 'struct FooAInA'
|
|
|
|
//@ !has 'foo/a/struct.FooAInA.html' '//pre' 'pub'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(in a) struct FooAInA;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/index.html' '//a[@href="struct.FooAPriv.html"]/..' 'FooAPriv 🔒'
|
|
|
|
//@ has 'foo/a/struct.FooAPriv.html' '//pre' 'struct FooAPriv'
|
|
|
|
//@ !has 'foo/a/struct.FooAPriv.html' '//pre' 'pub'
|
2020-12-25 18:27:56 -06:00
|
|
|
struct FooAPriv;
|
2020-12-25 17:38:46 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/index.html' '//a[@href="b/index.html"]/..' 'b 🔒'
|
2020-12-25 18:27:56 -06:00
|
|
|
mod b {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/b/index.html' '//a[@href="struct.FooBSuper.html"]/..' 'FooBSuper 🔒'
|
|
|
|
//@ has 'foo/a/b/struct.FooBSuper.html' '//pre' 'pub(super) struct FooBSuper'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(super) struct FooBSuper;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/b/index.html' '//a[@href="struct.FooBInSuperSuper.html"]/..' 'FooBInSuperSuper 🔒'
|
|
|
|
//@ has 'foo/a/b/struct.FooBInSuperSuper.html' '//pre' 'pub(crate) struct FooBInSuperSuper'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(in super::super) struct FooBInSuperSuper;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/b/index.html' '//a[@href="struct.FooBInAB.html"]/..' 'FooBInAB 🔒'
|
|
|
|
//@ has 'foo/a/b/struct.FooBInAB.html' '//pre' 'struct FooBInAB'
|
|
|
|
//@ !has 'foo/a/b/struct.FooBInAB.html' '//pre' 'pub'
|
2020-12-25 18:27:56 -06:00
|
|
|
pub(in a::b) struct FooBInAB;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/a/b/index.html' '//a[@href="struct.FooBPriv.html"]/..' 'FooBPriv 🔒'
|
|
|
|
//@ has 'foo/a/b/struct.FooBPriv.html' '//pre' 'struct FooBPriv'
|
|
|
|
//@ !has 'foo/a/b/struct.FooBPriv.html' '//pre' 'pub'
|
2020-12-25 18:27:56 -06:00
|
|
|
struct FooBPriv;
|
2022-03-21 05:40:25 -05:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ !has 'foo/a/b/index.html' '//a[@href="struct.FooBPub.html"]/..' 'FooBPub 🔒'
|
|
|
|
//@ has 'foo/a/b/struct.FooBPub.html' '//pre' 'pub struct FooBPub'
|
2022-03-21 05:40:25 -05:00
|
|
|
pub struct FooBPub;
|
2020-12-25 18:27:56 -06:00
|
|
|
}
|
2020-12-25 17:38:46 -06:00
|
|
|
}
|
2021-01-22 17:02:49 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/trait.PubTrait.html' '//pre' 'pub trait PubTrait'
|
2021-01-22 17:02:49 -06:00
|
|
|
//
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/trait.PubTrait.html' '//pre' 'type Type;'
|
|
|
|
//@ !has 'foo/trait.PubTrait.html' '//pre' 'pub type Type;'
|
2021-01-22 17:02:49 -06:00
|
|
|
//
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/trait.PubTrait.html' '//pre' 'const CONST: usize;'
|
|
|
|
//@ !has 'foo/trait.PubTrait.html' '//pre' 'pub const CONST: usize;'
|
2021-01-22 17:02:49 -06:00
|
|
|
//
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/trait.PubTrait.html' '//pre' 'fn function();'
|
|
|
|
//@ !has 'foo/trait.PubTrait.html' '//pre' 'pub fn function();'
|
2022-03-21 05:40:25 -05:00
|
|
|
//
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ !has 'foo/index.html' '//a[@href="trait.PubTrait.html"]/..' 'PubTrait 🔒'
|
2021-01-22 17:02:49 -06:00
|
|
|
|
|
|
|
pub trait PubTrait {
|
|
|
|
type Type;
|
|
|
|
const CONST: usize;
|
|
|
|
fn function();
|
|
|
|
}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html' '//a[@href="trait.PrivTrait.html"]/..' 'PrivTrait 🔒'
|
2022-03-21 05:40:25 -05:00
|
|
|
trait PrivTrait {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'type Type'
|
|
|
|
//@ !has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub type Type'
|
2021-01-22 17:02:49 -06:00
|
|
|
//
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'const CONST: usize'
|
|
|
|
//@ !has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub const CONST: usize'
|
2021-01-22 17:02:49 -06:00
|
|
|
//
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'fn function()'
|
|
|
|
//@ !has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub fn function()'
|
2021-01-22 17:02:49 -06:00
|
|
|
|
|
|
|
impl PubTrait for FooPublic {
|
|
|
|
type Type = usize;
|
|
|
|
const CONST: usize = 0;
|
|
|
|
fn function() {}
|
|
|
|
}
|
2023-04-29 15:19:57 -05:00
|
|
|
|
|
|
|
pub struct Assoc;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has foo/struct.Assoc.html
|
2023-04-29 15:19:57 -05:00
|
|
|
impl Assoc {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@id="associatedtype.TypePub"]' 'pub type TypePub'
|
2023-04-29 15:19:57 -05:00
|
|
|
pub type TypePub = usize;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@id="associatedtype.TypePriv"]' 'pub(crate) type TypePriv'
|
2023-04-29 15:19:57 -05:00
|
|
|
type TypePriv = usize;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@id="associatedconstant.CONST_PUB"]' 'pub const CONST_PUB'
|
2023-04-29 15:19:57 -05:00
|
|
|
pub const CONST_PUB: usize = 0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@id="associatedconstant.CONST_PRIV"]' 'pub(crate) const CONST_PRIV'
|
2023-04-29 15:19:57 -05:00
|
|
|
const CONST_PRIV: usize = 0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@id="method.function_pub"]' 'pub fn function_pub()'
|
2023-04-29 15:19:57 -05:00
|
|
|
pub fn function_pub() {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@id="method.function_priv"]' 'pub(crate) fn function_priv()'
|
2023-04-29 15:19:57 -05:00
|
|
|
fn function_priv() {}
|
|
|
|
}
|