File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ impl C {
2626 pub fn wat ( ) { }
2727}
2828
29- //@ has - '//a[@href="{{channel}}/core/fmt/macros/macro.Debug.html"]' 'Debug'
30- //@ has - '//a[@href="{{channel}}/core/cmp/macro.PartialEq.html"]' 'PartialEq'
29+ // These two links must not change and in particular must contain `/derive.`!
30+ //@ has - '//a[@href="{{channel}}/core/fmt/macros/derive.Debug.html"]' 'Debug'
31+ //@ has - '//a[@href="{{channel}}/core/cmp/derive.PartialEq.html"]' 'PartialEq'
3132#[ derive( Debug , PartialEq ) ]
3233pub struct Bar ;
3334impl Trait for Bar {
Original file line number Diff line number Diff line change 1+ // This test ensures that the same link is generated in both intra-doc links
2+ // and in jump to def links.
3+
4+ //@ compile-flags: -Zunstable-options --generate-link-to-definition
5+
6+ #![ crate_name = "foo" ]
7+
8+ // First we check intra-doc links.
9+ //@ has 'foo/struct.Bar.html'
10+ //@ has - '//a[@href="{{channel}}/core/fmt/macros/derive.Debug.html"]' 'Debug'
11+ //@ has - '//a[@href="{{channel}}/core/cmp/derive.PartialEq.html"]' 'PartialEq'
12+
13+
14+ // Then we check that they are the same in jump to def.
15+
16+ /// [Debug][derive@Debug] and [PartialEq][derive@PartialEq]
17+ //@ has 'src/foo/jump-to-def-intra-doc.rs.html'
18+ //@ has - '//a[@href="{{channel}}/core/fmt/macros/derive.Debug.html"]' 'Debug'
19+ //@ has - '//a[@href="{{channel}}/core/cmp/derive.PartialEq.html"]' 'PartialEq'
20+ #[ derive( Debug , PartialEq ) ]
21+ pub struct Bar ;
You can’t perform that action at this time.
0 commit comments