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