]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc/issue-60726.rs
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / rustdoc / issue-60726.rs
CommitLineData
dc9dc135
XL
1use std::marker::PhantomData;
2
3pub struct True;
4pub struct False;
5
6pub trait InterfaceType{
7 type Send;
8}
9
10
11pub struct FooInterface<T>(PhantomData<fn()->T>);
12
13impl<T> InterfaceType for FooInterface<T> {
14 type Send=False;
15}
16
17
18pub struct DynTrait<I>{
19 _interface:PhantomData<fn()->I>,
20 _unsync_unsend:PhantomData<::std::rc::Rc<()>>,
21}
22
23unsafe impl<I> Send for DynTrait<I>
24where
25 I:InterfaceType<Send=True>
26{}
27
28// @has issue_60726/struct.IntoIter.html
cdc7bbd5 29// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
dc9dc135 30// IntoIter<T>"
cdc7bbd5 31// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Sync for \
dc9dc135
XL
32// IntoIter<T>"
33pub struct IntoIter<T>{
34 hello:DynTrait<FooInterface<T>>,
35}