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'
|
|
|
|
// @has - '//h3[@class="sidebar-title"]' 'Associated Constants'
|
2022-02-08 16:05:00 +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'
|
|
|
|
// @has - '//h3[@class="sidebar-title"]' 'Associated Constants'
|
2022-02-08 16:05:00 +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() {}
|
|
|
|
}
|