forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add regression test for jump to def static method calls
- Loading branch information
1 parent
35ad2ae
commit 5bc7687
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} | ||
} |