]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-json/fns/generic_returns.rs
Auto merge of #94566 - yanganto:show-ignore-message, r=m-ou-se
[rust.git] / src / test / rustdoc-json / fns / generic_returns.rs
1 // ignore-tidy-linelength
2
3 #![feature(no_core)]
4 #![no_core]
5
6 // @count generic_returns.json "$.index[*][?(@.name=='generic_returns')].inner.items[*]" 2
7
8 // @set foo = - "$.index[*][?(@.name=='Foo')].id"
9 pub trait Foo {}
10
11 // @is - "$.index[*][?(@.name=='get_foo')].inner.decl.inputs" []
12 // @is - "$.index[*][?(@.name=='get_foo')].inner.decl.output.kind" '"impl_trait"'
13 // @count - "$.index[*][?(@.name=='get_foo')].inner.decl.output.inner[*]" 1
14 // @is - "$.index[*][?(@.name=='get_foo')].inner.decl.output.inner[0].trait_bound.trait.inner.id" $foo
15 pub fn get_foo() -> impl Foo {
16     Fooer {}
17 }
18
19 struct Fooer {}
20
21 impl Foo for Fooer {}