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