]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[rust.git] / src / test / ui / associated-type-bounds / bad-bounds-on-assoc-in-trait.stderr
1 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` is not an iterator
2   --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:5
3    |
4 LL |     type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<<Self as Case1>::C as Iterator>::Item` is not an iterator
6    |
7    = help: the trait `Iterator` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
8 help: consider further restricting the associated type
9    |
10 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Iterator {
11    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
14   --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:36
15    |
16 LL |     type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
17    |                                    ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
18    | 
19   ::: $SRC_DIR/core/src/marker.rs:LL:COL
20    |
21 LL | pub unsafe auto trait Send {
22    | -------------------------- required by this bound in `Send`
23    |
24    = help: the trait `Send` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
25 help: consider further restricting the associated type
26    |
27 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send {
28    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29
30 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
31   --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:93
32    |
33 LL |     type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
34    |                                                                                             ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
35    | 
36   ::: $SRC_DIR/core/src/marker.rs:LL:COL
37    |
38 LL | pub unsafe auto trait Sync {
39    | -------------------------- required by this bound in `Sync`
40    |
41    = help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
42 help: consider further restricting the associated type
43    |
44 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync {
45    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
47 error: aborting due to 3 previous errors
48
49 For more information about this error, try `rustc --explain E0277`.