blob: a9bc2d5d727d399b67717e95801d191cff5f246e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// ignore-tidy-linelength
#![feature(no_core)]
#![no_core]
// @count "$.index[*][?(@.name=='generic_returns')].inner.items[*]" 2
// @set foo = "$.index[*][?(@.name=='Foo')].id"
pub trait Foo {}
// @is "$.index[*][?(@.name=='get_foo')].inner.decl.inputs" []
// @is "$.index[*][?(@.name=='get_foo')].inner.decl.output.kind" '"impl_trait"'
// @count "$.index[*][?(@.name=='get_foo')].inner.decl.output.inner[*]" 1
// @is "$.index[*][?(@.name=='get_foo')].inner.decl.output.inner[0].trait_bound.trait.id" $foo
pub fn get_foo() -> impl Foo {
Fooer {}
}
struct Fooer {}
impl Foo for Fooer {}
|