]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/synthetic_auto/project.rs
Auto merge of #84471 - jyn514:linkcheck-llvm, r=Mark-Simulacrum
[rust.git] / src / test / rustdoc / synthetic_auto / project.rs
1 pub struct Inner<'a, T: 'a> {
2     field: &'a T,
3 }
4
5 trait MyTrait {
6     type MyItem;
7 }
8
9 trait OtherTrait {}
10
11 unsafe impl<'a, T> Send for Inner<'a, T>
12 where
13     'a: 'static,
14     T: MyTrait<MyItem = bool>,
15 {
16 }
17 unsafe impl<'a, T> Sync for Inner<'a, T>
18 where
19     'a: 'static,
20     T: MyTrait,
21     <T as MyTrait>::MyItem: OtherTrait,
22 {
23 }
24
25 // @has project/struct.Foo.html
26 // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Send \
27 // for Foo<'c, K> where K: MyTrait<MyItem = bool>, 'c: 'static"
28 //
29 // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Sync \
30 // for Foo<'c, K> where K: MyTrait, <K as MyTrait>::MyItem: OtherTrait, 'c: 'static,"
31 pub struct Foo<'c, K: 'c> {
32     inner_field: Inner<'c, K>,
33 }