Skip to content

Commit 8b0f8cb

Browse files
Add regression test for jump to def links on items with generics
1 parent 786b747 commit 8b0f8cb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This test ensures that paths with generics still get their link to their definition
2+
// correctly generated.
3+
4+
//@ compile-flags: -Zunstable-options --generate-link-to-definition
5+
#![crate_name = "foo"]
6+
7+
//@ has 'src/foo/link-on-path-with-generics.rs.html'
8+
9+
pub struct Soyo<T>(T);
10+
pub struct Saya;
11+
12+
//@ has - '//pre[@class="rust"]//a[@href="#9"]' 'Soyo'
13+
//@ has - '//pre[@class="rust"]//a[@href="#10"]' 'Saya'
14+
pub fn bar<T>(s: Soyo<T>, x: Saya) {}

0 commit comments

Comments
 (0)