We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 198dea5 commit 51dd090Copy full SHA for 51dd090
src/test/rustdoc/empty-impl-block.rs
@@ -0,0 +1,20 @@
1
+#![crate_name = "foo"]
2
+
3
+// @has 'foo/struct.Foo.html'
4
+pub struct Foo;
5
6
+// @has - '//*[@class="docblock"]' 'Hello empty impl block!'
7
+// @has - '//*[@class="item-info"]' 'This impl block contains no items.'
8
+/// Hello empty impl block!
9
+impl Foo {}
10
+// We ensure that this empty impl block without doc isn't rendered.
11
+// @count - '//*[@class="impl has-srclink"]' 'impl Foo' 1
12
13
14
+// Just to ensure that empty trait impl blocks are rendered.
15
+pub struct Another;
16
+pub trait Bar {}
17
18
+// @has 'foo/struct.Another.html'
19
+// @has - '//h3[@class="code-header in-band"]' 'impl Bar for Another'
20
+impl Bar for Another {}
0 commit comments