]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/issue-54705.rs
Rollup merge of #55852 - varkor:dotdotequals-lint, r=zackmdavis
[rust.git] / src / test / rustdoc / issue-54705.rs
1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11
12 pub trait ScopeHandle<'scope> {}
13
14
15
16 // @has issue_54705/struct.ScopeFutureContents.html
17 // @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//*/code' "impl<'scope, S> \
18 // Send for ScopeFutureContents<'scope, S> where S: Sync"
19 //
20 // @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//*/code' "impl<'scope, S> \
21 // Sync for ScopeFutureContents<'scope, S> where S: Sync"
22 pub struct ScopeFutureContents<'scope, S>
23     where S: ScopeHandle<'scope>,
24 {
25     dummy: &'scope S,
26     this: Box<ScopeFuture<'scope, S>>,
27 }
28
29 struct ScopeFuture<'scope, S>
30     where S: ScopeHandle<'scope>,
31 {
32     contents: ScopeFutureContents<'scope, S>,
33 }
34
35 unsafe impl<'scope, S> Send for ScopeFuture<'scope, S>
36     where S: ScopeHandle<'scope>,
37 {}
38 unsafe impl<'scope, S> Sync for ScopeFuture<'scope, S>
39     where S: ScopeHandle<'scope>,
40 {}