This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ // ignore-tidy-linelength
2+ #![ feature( trait_alias) ]
3+
4+ // @set StrLike = "$.index[*][?(@.name=='StrLike')].id"
5+ // @is "$.index[*][?(@.name=='StrLike')].visibility" \"public\"
6+ // @has "$.index[*][?(@.name=='StrLike')].inner.trait_alias"
7+ // @is "$.index[*][?(@.name=='StrLike')].span.filename" $FILE
8+ pub trait StrLike = AsRef < str > ;
9+
10+ // @is "$.index[*][?(@.name=='f')].inner.function.decl.output.impl_trait[0].trait_bound.trait.id" $StrLike
11+ pub fn f ( ) -> impl StrLike {
12+ "heya"
13+ }
14+
15+ // @!is "$.index[*][?(@.name=='g')].inner.function.decl.output.impl_trait[0].trait_bound.trait.id" $StrLike
16+ pub fn g ( ) -> impl AsRef < str > {
17+ "heya"
18+ }
Original file line number Diff line number Diff line change 1+ // @set IntVec = "$.index[*][?(@.name=='IntVec')].id"
2+ // @is "$.index[*][?(@.name=='IntVec')].visibility" \"public\"
3+ // @has "$.index[*][?(@.name=='IntVec')].inner.type_alias"
4+ // @is "$.index[*][?(@.name=='IntVec')].span.filename" $FILE
5+ pub type IntVec = Vec < u32 > ;
6+
7+ // @is "$.index[*][?(@.name=='f')].inner.function.decl.output.resolved_path.id" $IntVec
8+ pub fn f ( ) -> IntVec {
9+ vec ! [ 0 ; 32 ]
10+ }
11+
12+ // @!is "$.index[*][?(@.name=='g')].inner.function.decl.output.resolved_path.id" $IntVec
13+ pub fn g ( ) -> Vec < u32 > {
14+ vec ! [ 0 ; 32 ]
15+ }
You can’t perform that action at this time.
0 commit comments