]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-json/generic-associated-types/gats.rs
Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkov
[rust.git] / src / test / rustdoc-json / generic-associated-types / gats.rs
1 // ignore-tidy-linelength
2
3 #![no_core]
4 #![feature(lang_items, no_core)]
5
6 #[lang = "sized"]
7 pub trait Sized {}
8
9 pub trait Display {}
10
11 pub trait LendingIterator {
12     // @count "$.index[*][?(@.name=='LendingItem')].inner.generics.params[*]" 1
13     // @is "$.index[*][?(@.name=='LendingItem')].inner.generics.params[*].name" \"\'a\"
14     // @count "$.index[*][?(@.name=='LendingItem')].inner.generics.where_predicates[*]" 1
15     // @is "$.index[*][?(@.name=='LendingItem')].inner.generics.where_predicates[*].bound_predicate.type.inner" \"Self\"
16     // @is "$.index[*][?(@.name=='LendingItem')].inner.generics.where_predicates[*].bound_predicate.bounds[*].outlives" \"\'a\"
17     // @count "$.index[*][?(@.name=='LendingItem')].inner.bounds[*]" 1
18     type LendingItem<'a>: Display
19     where
20         Self: 'a;
21
22     // @is "$.index[*][?(@.name=='lending_next')].inner.decl.output.kind" \"qualified_path\"
23     // @count "$.index[*][?(@.name=='lending_next')].inner.decl.output.inner.args.angle_bracketed.args[*]" 1
24     // @count "$.index[*][?(@.name=='lending_next')].inner.decl.output.inner.args.angle_bracketed.bindings[*]" 0
25     // @is "$.index[*][?(@.name=='lending_next')].inner.decl.output.inner.self_type.inner" \"Self\"
26     // @is "$.index[*][?(@.name=='lending_next')].inner.decl.output.inner.name" \"LendingItem\"
27     fn lending_next<'a>(&'a self) -> Self::LendingItem<'a>;
28 }
29
30 pub trait Iterator {
31     // @count "$.index[*][?(@.name=='Item')].inner.generics.params[*]" 0
32     // @count "$.index[*][?(@.name=='Item')].inner.generics.where_predicates[*]" 0
33     // @count "$.index[*][?(@.name=='Item')].inner.bounds[*]" 1
34     type Item: Display;
35
36     // @is "$.index[*][?(@.name=='next')].inner.decl.output.kind" \"qualified_path\"
37     // @count "$.index[*][?(@.name=='next')].inner.decl.output.inner.args.angle_bracketed.args[*]" 0
38     // @count "$.index[*][?(@.name=='next')].inner.decl.output.inner.args.angle_bracketed.bindings[*]" 0
39     // @is "$.index[*][?(@.name=='next')].inner.decl.output.inner.self_type.inner" \"Self\"
40     // @is "$.index[*][?(@.name=='next')].inner.decl.output.inner.name" \"Item\"
41     fn next<'a>(&'a self) -> Self::Item;
42 }