mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 04:14:28 +00:00
rustdoc-json: Add tests for static
s
This commit is contained in:
parent
15b663e684
commit
51ea7c12e7
10
tests/rustdoc-json/statics/statics.rs
Normal file
10
tests/rustdoc-json/statics/statics.rs
Normal file
@ -0,0 +1,10 @@
|
||||
//@ is '$.index[*][?(@.name=="A")].inner.static.type.primitive' '"i32"'
|
||||
//@ is '$.index[*][?(@.name=="A")].inner.static.is_mutable' false
|
||||
//@ is '$.index[*][?(@.name=="A")].inner.static.expr' '"5"'
|
||||
pub static A: i32 = 5;
|
||||
|
||||
//@ is '$.index[*][?(@.name=="B")].inner.static.type.primitive' '"u32"'
|
||||
//@ is '$.index[*][?(@.name=="B")].inner.static.is_mutable' true
|
||||
// Expr value isn't gaurenteed, it'd be fine to change it.
|
||||
//@ is '$.index[*][?(@.name=="B")].inner.static.expr' '"_"'
|
||||
pub static mut B: u32 = 2 + 3;
|
Loading…
Reference in New Issue
Block a user