File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ // This test ensures that the source links are generated for impl associated types.
2
+
3
+ #![ crate_name = "foo" ]
4
+ #![ feature( inherent_associated_types) ]
5
+ #![ allow( incomplete_features) ]
6
+
7
+ //@ has 'foo/struct.Bar.html'
8
+ pub struct Bar ;
9
+
10
+ impl Bar {
11
+ //@ has - '//*[@id="implementations-list"]//*[@id="associatedtype.Y"]/a' 'source'
12
+ //@ has - '//*[@id="implementations-list"]//*[@id="associatedtype.Y"]/a/@href' \
13
+ // '../src/foo/assoc-type-source-link.rs.html#14'
14
+ pub type Y = u8 ;
15
+ }
16
+
17
+ pub trait Foo {
18
+ type Z ;
19
+ }
20
+
21
+ impl Foo for Bar {
22
+ //@ has - '//*[@id="trait-implementations-list"]//*[@id="associatedtype.Z"]/a' 'source'
23
+ //@ has - '//*[@id="trait-implementations-list"]//*[@id="associatedtype.Z"]/a/@href' \
24
+ // '../src/foo/assoc-type-source-link.rs.html#25'
25
+ type Z = u8 ;
26
+ }
You can’t perform that action at this time.
0 commit comments