File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ // This test checks that rustdoc is combining `<code>` tags as expected.
2+
3+ #![ crate_name = "foo" ]
4+
5+ //@ has 'foo/index.html'
6+
7+ // First we check that summary lines also get the `<code>` merge.
8+ //@ has - '//dd/code' 'Stream<Item = io::Result<Bytes>>'
9+ //@ !has - '//dd/code/code' 'Stream<Item = io::Result<Bytes>>'
10+ // Then we check that the docblocks have it too.
11+ //@ has 'foo/struct.Foo.html'
12+ //@ has - '//*[@class="docblock"]//code' 'Stream<Item = io::Result<Bytes>>'
13+ //@ has - '//*[@class="docblock"]//code' 'Stream<Item = io::Result<Bytes>>'
14+ /// [`Stream`](crate::Foo)`<Item = `[`io::Result`](crate::Foo)`<`[`Bytes`](crate::Foo)`>>`
15+ pub struct Foo ;
16+
17+ impl Foo {
18+ //@ has - '//*[@class="impl-items"]//*[@class="docblock"]//code' '<Stream>'
19+ /// A `<`[`Stream`](crate::Foo)`>` stuff.
20+ pub fn bar ( ) { }
21+
22+ //@ has - '//*[@class="impl-items"]//*[@class="docblock"]//code' '<'
23+ //@ has - '//*[@class="impl-items"]//*[@class="docblock"]//a' 'Stream a'
24+ //@ has - '//*[@class="impl-items"]//*[@class="docblock"]//code' 'Stream'
25+ //@ has - '//*[@class="impl-items"]//*[@class="docblock"]//code' '>'
26+ /// A `<`[`Stream` a](crate::Foo)`>` stuff.
27+ pub fn foo ( ) { }
28+ }
You can’t perform that action at this time.
0 commit comments