Add regression test for jump to def links on items with generics
This commit is contained in:
parent
786b7477f6
commit
8b0f8cb73c
1 changed files with 14 additions and 0 deletions
14
tests/rustdoc/link-on-path-with-generics.rs
Normal file
14
tests/rustdoc/link-on-path-with-generics.rs
Normal file
|
@ -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) {}
|
Loading…
Add table
Reference in a new issue