]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/issue-54705.rs
Rollup merge of #107580 - lenko-d:default_value_for_a_lifetime_generic_parameter_prod...
[rust.git] / tests / rustdoc / issue-54705.rs
1 pub trait ScopeHandle<'scope> {}
2
3 // @has issue_54705/struct.ScopeFutureContents.html
4 // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
5 // "impl<'scope, S> Send for ScopeFutureContents<'scope, S>where S: Sync"
6 //
7 // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
8 // "impl<'scope, S> Sync for ScopeFutureContents<'scope, S>where S: Sync"
9 pub struct ScopeFutureContents<'scope, S>
10     where S: ScopeHandle<'scope>,
11 {
12     dummy: &'scope S,
13     this: Box<ScopeFuture<'scope, S>>,
14 }
15
16 struct ScopeFuture<'scope, S>
17     where S: ScopeHandle<'scope>,
18 {
19     contents: ScopeFutureContents<'scope, S>,
20 }
21
22 unsafe impl<'scope, S> Send for ScopeFuture<'scope, S>
23     where S: ScopeHandle<'scope>,
24 {}
25 unsafe impl<'scope, S> Sync for ScopeFuture<'scope, S>
26     where S: ScopeHandle<'scope>,
27 {}