]>
Commit | Line | Data |
---|---|---|
0531ce1d XL |
1 | mod 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 | ||
27 | pub use foo::{Foo, Inner as NotInner, MyTrait as NotMyTrait, Outer as NotOuter}; | |
28 | ||
29 | unsafe impl<T> Send for Foo<T> | |
30 | where | |
31 | T: NotMyTrait<'static>, | |
32 | { | |
33 | } | |
34 | ||
35 | unsafe impl<'a, Q, R: ?Sized> Send for NotInner<'a, Q, R> | |
36 | where | |
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 | } |