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