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.
Rollup merge of rust-lang#133180 - GuillaumeGomez:jump-to-def-links-g…
…enerics, r=notriddle [rustdoc] Fix items with generics not having their jump to def link generated Because the span originally included the generics, during the highlighting, it was not retrieved and therefore its jump to def link was not generated. r? ``@notriddle``
- Loading branch information
Showing
2 changed files
with
33 additions
and
4 deletions.
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,14 @@ | ||
// This test ensures that paths with generics still get their link to their definition | ||
// correctly generated. | ||
|
||
//@ compile-flags: -Zunstable-options --generate-link-to-definition | ||
#![crate_name = "foo"] | ||
|
||
//@ has 'src/foo/link-on-path-with-generics.rs.html' | ||
|
||
pub struct Soyo<T>(T); | ||
pub struct Saya; | ||
|
||
//@ has - '//pre[@class="rust"]//a[@href="#9"]' 'Soyo' | ||
//@ has - '//pre[@class="rust"]//a[@href="#10"]' 'Saya' | ||
pub fn bar<T>(s: Soyo<T>, x: Saya) {} |