Skip to content

Commit 5062a77

Browse files
Add test for tuple struct field generation in search index
1 parent e802e99 commit 5062a77

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: src/test/rustdoc/no-unit-struct-field.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This test ensures that the tuple struct fields are not generated in the
2+
// search index.
3+
4+
// @!hasraw search-index.js '"0"'
5+
// @!hasraw search-index.js '"1"'
6+
// @hasraw search-index.js '"foo_a"'
7+
// @hasraw search-index.js '"bar_a"'
8+
9+
pub struct Bar(pub u32, pub u8);
10+
pub struct Foo {
11+
pub foo_a: u8,
12+
}
13+
pub enum Enum {
14+
Foo(u8),
15+
Bar {
16+
bar_a: u8,
17+
},
18+
}

0 commit comments

Comments
 (0)