2024-01-15 09:47:14 -06:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/index.html'
|
2024-01-15 09:47:14 -06:00
|
|
|
// There should be only `type A`.
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ count - '//*[@class="item-table"]//*[@class="item-name"]' 1
|
|
|
|
//@ has - '//*[@class="item-name"]/a[@href="type.A.html"]' 'A'
|
2024-01-15 09:47:14 -06:00
|
|
|
|
|
|
|
mod foo {
|
|
|
|
pub struct S;
|
|
|
|
}
|
|
|
|
|
|
|
|
use foo::S;
|
|
|
|
|
|
|
|
pub type A = S;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/type.A.html'
|
|
|
|
//@ has - '//*[@id="method.default"]/h4' 'fn default() -> Self'
|
2024-01-15 09:47:14 -06:00
|
|
|
impl Default for A {
|
|
|
|
fn default() -> Self {
|
|
|
|
S
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@id="method.a"]/h4' 'pub fn a(&self)'
|
2024-01-15 09:47:14 -06:00
|
|
|
impl A {
|
|
|
|
pub fn a(&self) {}
|
|
|
|
}
|