]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/synthetic_auto/project.rs
rustdoc: remove unused class `has-srclink`
[rust.git] / tests / 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"]//h3[@class="code-header"]' \
27 // "impl<'c, K> Send for Foo<'c, K>where K: MyTrait<MyItem = bool>, 'c: 'static"
28 //
29 // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
30 // "impl<'c, K> Sync for Foo<'c, K>where K: MyTrait, <K as MyTrait>::MyItem: OtherTrait, \
31 // 'c: 'static,"
32 pub struct Foo<'c, K: 'c> {
33     inner_field: Inner<'c, K>,
34 }