Skip to content

Commit 51ea7c1

Browse files
committed
rustdoc-json: Add tests for statics
1 parent 15b663e commit 51ea7c1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: tests/rustdoc-json/statics/statics.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ is '$.index[*][?(@.name=="A")].inner.static.type.primitive' '"i32"'
2+
//@ is '$.index[*][?(@.name=="A")].inner.static.is_mutable' false
3+
//@ is '$.index[*][?(@.name=="A")].inner.static.expr' '"5"'
4+
pub static A: i32 = 5;
5+
6+
//@ is '$.index[*][?(@.name=="B")].inner.static.type.primitive' '"u32"'
7+
//@ is '$.index[*][?(@.name=="B")].inner.static.is_mutable' true
8+
// Expr value isn't gaurenteed, it'd be fine to change it.
9+
//@ is '$.index[*][?(@.name=="B")].inner.static.expr' '"_"'
10+
pub static mut B: u32 = 2 + 3;

0 commit comments

Comments
 (0)