Skip to content

Commit

Permalink
Add test for impls in typedef
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Sep 29, 2021
1 parent 348ef7c commit 484dc48
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/rustdoc-json/typedefs/type_impl.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#![no_std]

// @has type_impl.json "$.index[*][?(@.name=='Ix')].visibility" \"public\"
// @has - "$.index[*][?(@.name=='Ix')].kind" \"typedef\"
pub type Ix = usize;

// @has - "$.index[*][?(@.name=='IxTrait')].visibility" \"public\"
// @has - "$.index[*][?(@.name=='IxTrait')].kind" \"trait\"
pub trait IxTrait {}

// @count - "$.index[*][?(@.name=='Ix')].inner.impls" 1
impl IxTrait for Ix {}

0 comments on commit 484dc48

Please sign in to comment.