mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
19 lines
631 B
Rust
19 lines
631 B
Rust
// ignore-tidy-linelength
|
|
#![feature(trait_alias)]
|
|
|
|
//@ set StrLike = "$.index[*][?(@.name=='StrLike')].id"
|
|
//@ is "$.index[*][?(@.name=='StrLike')].visibility" \"public\"
|
|
//@ has "$.index[*][?(@.name=='StrLike')].inner.trait_alias"
|
|
//@ is "$.index[*][?(@.name=='StrLike')].span.filename" $FILE
|
|
pub trait StrLike = AsRef<str>;
|
|
|
|
//@ is "$.index[*][?(@.name=='f')].inner.function.decl.output.impl_trait[0].trait_bound.trait.id" $StrLike
|
|
pub fn f() -> impl StrLike {
|
|
"heya"
|
|
}
|
|
|
|
//@ !is "$.index[*][?(@.name=='g')].inner.function.decl.output.impl_trait[0].trait_bound.trait.id" $StrLike
|
|
pub fn g() -> impl AsRef<str> {
|
|
"heya"
|
|
}
|