Skip to content

Commit 434adff

Browse files
committed
rustdoc: add test case for auto traits on slice primitive
1 parent 57450c6 commit 434adff

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// compile-flags: --crate-type lib --edition 2018
2+
3+
#![crate_name = "foo"]
4+
#![feature(rustdoc_internals)]
5+
6+
// @has foo/primitive.slice.html '//a[@class="primitive"]' 'slice'
7+
// @has - '//span[@class="in-band"]' 'Primitive Type slice'
8+
// @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!'
9+
// @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations'
10+
// @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Send for [T] where T: Send'
11+
// @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Sync for [T] where T: Sync'
12+
#[doc(primitive = "slice")]
13+
/// this is a test!
14+
mod slice_prim {}

0 commit comments

Comments
 (0)