]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[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` cannot be sent between threads safely
2   --> $DIR/bad-bounds-on-assoc-in-trait.rs:26: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    = help: the trait `Send` 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: Send {
11    |             ++++++++++++++++++++++++++++++++++++++++++++++++++
12
13 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` is not an iterator
14   --> $DIR/bad-bounds-on-assoc-in-trait.rs:26:43
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` is not an iterator
18    |
19    = help: the trait `Iterator` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
20 help: consider further restricting the associated type
21    |
22 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Iterator {
23    |             ++++++++++++++++++++++++++++++++++++++++++++++++++++++
24
25 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
26   --> $DIR/bad-bounds-on-assoc-in-trait.rs:26:93
27    |
28 LL |     type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
29    |                                                                                             ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
30    |
31    = help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
32 help: consider further restricting the associated type
33    |
34 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync {
35    |             ++++++++++++++++++++++++++++++++++++++++++++++++++
36
37 error: aborting due to 3 previous errors
38
39 For more information about this error, try `rustc --explain E0277`.