1 // This test ensures that anchors are generated in the right places.
3 #![feature(inherent_associated_types)]
4 #![allow(incomplete_features)]
9 // @has 'foo/trait.Bar.html'
11 // There should be no anchors here.
12 // @snapshot no_type_anchor - '//*[@id="associatedtype.T"]'
14 // There should be no anchors here.
15 // @snapshot no_const_anchor - '//*[@id="associatedconstant.YOLO"]'
18 // There should be no anchors here.
19 // @snapshot no_tymethod_anchor - '//*[@id="tymethod.foo"]'
21 // There should be no anchors here.
22 // @snapshot no_trait_method_anchor - '//*[@id="method.bar"]'
26 // @has 'foo/struct.Foo.html'
28 // @has - '//*[@id="associatedtype.T"]/a[@class="anchor"]' ''
30 // @has - '//*[@id="associatedconstant.YOLO"]/a[@class="anchor"]' ''
33 // @has - '//*[@id="method.foo"]/a[@class="anchor"]' ''
35 // Same check for provided "bar" method.
36 // @has - '//*[@id="method.bar"]/a[@class="anchor"]' ''
40 // @snapshot no_const_anchor2 - '//*[@id="associatedconstant.X"]'
41 // There should be no anchors here.
43 // @snapshot no_type_anchor2 - '//*[@id="associatedtype.Y"]'
44 // There should be no anchors here.
46 // @snapshot no_method_anchor - '//*[@id="method.new"]'
47 // There should be no anchors here.
48 pub fn new() -> Self { Self }