提交 9277f959 编写于 作者: G Guillaume Gomez

Add test for associated items in rustdoc JSON

上级 c1c0d259
#![no_std]
// @has assoc_items.json
pub struct Simple;
impl Simple {
// @has - "$.index[*][?(@.name=='CONSTANT')].kind" \"assoc_const\"
pub const CONSTANT: usize = 0;
}
pub trait EasyToImpl {
// @has - "$.index[*][?(@.name=='ToDeclare')].kind" \"assoc_type\"
// @has - "$.index[*][?(@.name=='ToDeclare')].inner.default" null
type ToDeclare;
// @has - "$.index[*][?(@.name=='AN_ATTRIBUTE')].kind" \"assoc_const\"
// @has - "$.index[*][?(@.name=='AN_ATTRIBUTE')].inner.default" null
const AN_ATTRIBUTE: usize;
}
impl EasyToImpl for Simple {
// @has - "$.index[*][?(@.name=='ToDeclare')].inner.default.kind" \"primitive\"
// @has - "$.index[*][?(@.name=='ToDeclare')].inner.default.inner" \"usize\"
type ToDeclare = usize;
// @has - "$.index[*][?(@.name=='AN_ATTRIBUTE')].inner.type.kind" \"primitive\"
// @has - "$.index[*][?(@.name=='AN_ATTRIBUTE')].inner.type.inner" \"usize\"
// @has - "$.index[*][?(@.name=='AN_ATTRIBUTE')].inner.default" \"12\"
const AN_ATTRIBUTE: usize = 12;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册