about summary refs log tree commit diff
path: root/tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs
blob: 618569787733ce5421b08ec25ee13bd9e6ad4171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//@ compile-flags: -Zunstable-options --generate-link-to-definition

#![crate_name = "foo"]

//@ has 'src/foo/jump-to-def-doc-links-calls.rs.html'

//@ has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar'
pub struct Bar;

impl std::default::Default for Bar {
    //@ has - '//a[@href="#20-22"]' 'Self::new'
    fn default() -> Self {
        Self::new()
    }
}

//@ has - '//a[@href="#8"]' 'Bar'
impl Bar {
     //@ has - '//a[@href="#24-26"]' 'Self::bar'
     pub fn new()-> Self {
         Self::bar()
     }

     pub fn bar() -> Self {
         Self
     }
}