2021-10-12 13:07:11 +00:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
|
|
|
pub trait Trait {
|
|
|
|
const FOO: u32 = 12;
|
|
|
|
|
|
|
|
fn foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Bar;
|
|
|
|
|
|
|
|
// @has 'foo/struct.Bar.html'
|
2022-10-15 18:53:47 +00:00
|
|
|
// @!has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants'
|
2022-03-30 14:37:55 +00:00
|
|
|
// @!has - '//div[@class="sidebar-elems"]//a' 'FOO'
|
2021-10-12 13:07:11 +00:00
|
|
|
impl Trait for Bar {
|
|
|
|
const FOO: u32 = 1;
|
|
|
|
|
|
|
|
fn foo() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub enum Foo {
|
|
|
|
A,
|
|
|
|
}
|
|
|
|
|
|
|
|
// @has 'foo/enum.Foo.html'
|
2022-10-15 18:53:47 +00:00
|
|
|
// @!has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants'
|
2022-03-30 14:37:55 +00:00
|
|
|
// @!has - '//div[@class="sidebar-elems"]//a' 'FOO'
|
2021-10-12 13:07:11 +00:00
|
|
|
impl Trait for Foo {
|
|
|
|
const FOO: u32 = 1;
|
|
|
|
|
|
|
|
fn foo() {}
|
|
|
|
}
|
2022-03-30 14:37:55 +00:00
|
|
|
|
|
|
|
pub struct Baz;
|
|
|
|
|
|
|
|
// @has 'foo/struct.Baz.html'
|
2022-10-15 18:53:47 +00:00
|
|
|
// @has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants'
|
2022-03-30 14:37:55 +00:00
|
|
|
// @has - '//div[@class="sidebar-elems"]//a' 'FOO'
|
|
|
|
impl Baz {
|
|
|
|
pub const FOO: u32 = 42;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub enum Quux {
|
|
|
|
B,
|
|
|
|
}
|
|
|
|
|
|
|
|
// @has 'foo/enum.Quux.html'
|
2022-10-15 18:53:47 +00:00
|
|
|
// @has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants'
|
2022-03-30 14:37:55 +00:00
|
|
|
// @has - '//div[@class="sidebar-elems"]//a' 'FOO'
|
|
|
|
impl Quux {
|
|
|
|
pub const FOO: u32 = 42;
|
|
|
|
}
|