3 #![feature(rustdoc_internals)]
6 // @has - '//h2[@id="primitives"]' 'Primitive Types'
7 // @has - '//a[@href="primitive.reference.html"]' 'reference'
8 // @has - '//div[@class="sidebar-elems"]//li/a' 'Primitive Types'
9 // @has - '//div[@class="sidebar-elems"]//li/a/@href' '#primitives'
10 // @has foo/primitive.reference.html
11 // @has - '//a[@class="primitive"]' 'reference'
12 // @has - '//span[@class="in-band"]' 'Primitive Type reference'
13 // @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!'
15 // There should be only one implementation listed.
16 // @count - '//*[@class="impl has-srclink"]' 1
17 // @has - '//*[@id="impl-Foo%3C%26A%3E-for-%26B"]/*[@class="code-header in-band"]' \
18 // 'impl<A, B> Foo<&A> for &B'
19 #[doc(primitive = "reference")]
25 // This implementation should **not** show up.
26 impl<T> From<&T> for Bar {
27 fn from(s: &T) -> Self {
33 fn stuff(&self, other: &T) {}
36 // This implementation should show up.
37 impl<A, B> Foo<&A> for &B {}