]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/synthetic_auto/lifetimes.rs
Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors
[rust.git] / tests / rustdoc / synthetic_auto / lifetimes.rs
1 pub struct Inner<'a, T: 'a> {
2     field: &'a T,
3 }
4
5 unsafe impl<'a, T> Send for Inner<'a, T>
6 where
7     'a: 'static,
8     T: for<'b> Fn(&'b bool) -> &'a u8,
9 {}
10
11 // @has lifetimes/struct.Foo.html
12 // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
13 // "impl<'c, K> Send for Foo<'c, K>where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static"
14 //
15 // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
16 // "impl<'c, K> Sync for Foo<'c, K>where K: Sync"
17 pub struct Foo<'c, K: 'c> {
18     inner_field: Inner<'c, K>,
19 }