@@ -2,13 +2,30 @@ error[E0599]: the method `clone_as_arc` exists for struct `Handle<MutFoo>`, but
2
2
--> tests/invalid-handle-code/mut-clone-handle.rs:13:15
3
3
|
4
4
8 | pub struct MutFoo;
5
- | ----------------- doesn't satisfy `<MutFoo as HandleDescriptor>::Mutable = False`
5
+ | ----------------- doesn't satisfy 5 bounds
6
6
...
7
7
13 | let r = h.clone_as_arc();
8
8
| ^^^^^^^^^^^^ method cannot be called on `Handle<MutFoo>` due to unsatisfied trait bounds
9
9
|
10
10
= note: the following trait bounds were not satisfied:
11
11
`<MutFoo as HandleDescriptor>::Mutable = False`
12
+ `<MutFoo as handle::private::HandleOps<_, False, _>>::From = Arc<_>`
13
+ `MutFoo: handle::private::SharedHandleOps<_, _>`
14
+ `MutFoo: handle::private::SharedHandle`
15
+ which is required by `MutFoo: handle::private::SharedHandleOps<_, _>`
16
+ `MutFoo: handle::private::HandleOps<_, False, _>`
17
+ which is required by `MutFoo: handle::private::SharedHandleOps<_, _>`
18
+ note: the traits `handle::private::SharedHandle`, `handle::private::HandleOps`, and `handle::private::SharedHandleOps` must be implemented
19
+ --> src/handle.rs
20
+ |
21
+ | pub trait SharedHandle {}
22
+ | ^^^^^^^^^^^^^^^^^^^^^^
23
+ ...
24
+ | pub trait HandleOps<T: ?Sized, M, S> {
25
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
+ ...
27
+ | pub trait SharedHandleOps<T: ?Sized, S>: HandleOps<T, False, S> + SharedHandle {
28
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
29
13
30
error[E0271]: type mismatch resolving `<MutFoo as HandleDescriptor>::Mutable == False`
14
31
--> tests/invalid-handle-code/mut-clone-handle.rs:12:41
@@ -23,10 +40,27 @@ error[E0599]: the method `clone_handle` exists for struct `Handle<MutFoo>`, but
23
40
--> tests/invalid-handle-code/mut-clone-handle.rs:14:15
24
41
|
25
42
8 | pub struct MutFoo;
26
- | ----------------- doesn't satisfy `<MutFoo as HandleDescriptor>::Mutable = False`
43
+ | ----------------- doesn't satisfy 5 bounds
27
44
...
28
45
14 | let h = h.clone_handle();
29
46
| ^^^^^^^^^^^^
30
47
|
31
48
= note: the following trait bounds were not satisfied:
32
49
`<MutFoo as HandleDescriptor>::Mutable = False`
50
+ `<MutFoo as handle::private::HandleOps<_, False, _>>::From = Arc<_>`
51
+ `MutFoo: handle::private::SharedHandleOps<_, _>`
52
+ `MutFoo: handle::private::SharedHandle`
53
+ which is required by `MutFoo: handle::private::SharedHandleOps<_, _>`
54
+ `MutFoo: handle::private::HandleOps<_, False, _>`
55
+ which is required by `MutFoo: handle::private::SharedHandleOps<_, _>`
56
+ note: the traits `handle::private::SharedHandle`, `handle::private::HandleOps`, and `handle::private::SharedHandleOps` must be implemented
57
+ --> src/handle.rs
58
+ |
59
+ | pub trait SharedHandle {}
60
+ | ^^^^^^^^^^^^^^^^^^^^^^
61
+ ...
62
+ | pub trait HandleOps<T: ?Sized, M, S> {
63
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64
+ ...
65
+ | pub trait SharedHandleOps<T: ?Sized, S>: HandleOps<T, False, S> + SharedHandle {
66
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments