]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc/synthetic_auto/complex.rs
Update unsuspicious file list
[rustc.git] / src / test / rustdoc / synthetic_auto / complex.rs
CommitLineData
0531ce1d
XL
1mod foo {
2 pub trait MyTrait<'a> {
3 type MyItem: ?Sized;
4 }
5
6 pub struct Inner<'a, Q, R: ?Sized> {
7 field: Q,
8 field3: &'a u8,
9 my_foo: Foo<Q>,
10 field2: R,
11 }
12
13 pub struct Outer<'a, T, K: ?Sized> {
14 my_inner: Inner<'a, T, K>,
15 }
16
17 pub struct Foo<T> {
18 myfield: T,
19 }
20}
21
22// @has complex/struct.NotOuter.html
2b03887a 23// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \
f2b60f7d 24// "impl<'a, T, K: ?Sized> Send for Outer<'a, T, K>where K: for<'b> Fn((&'b bool, &'a u8)) \
0531ce1d
XL
25// -> &'b i8, T: MyTrait<'a>, <T as MyTrait<'a>>::MyItem: Copy, 'a: 'static"
26
27pub use foo::{Foo, Inner as NotInner, MyTrait as NotMyTrait, Outer as NotOuter};
28
29unsafe impl<T> Send for Foo<T>
30where
31 T: NotMyTrait<'static>,
32{
33}
34
35unsafe impl<'a, Q, R: ?Sized> Send for NotInner<'a, Q, R>
36where
37 Q: NotMyTrait<'a>,
38 <Q as NotMyTrait<'a>>::MyItem: Copy,
39 R: for<'b> Fn((&'b bool, &'a u8)) -> &'b i8,
40 Foo<Q>: Send,
41{
42}