]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
New upstream version 1.56.0~beta.4+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 = help: the trait `Send` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
8 note: required by a bound in `Send`
9 --> $SRC_DIR/core/src/marker.rs:LL:COL
10 |
11 LL | / pub unsafe auto trait Send {
12 LL | | // empty.
13 LL | | }
14 | |_^ required by this bound in `Send`
15 help: consider further restricting the associated type
16 |
17 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send {
18 | ++++++++++++++++++++++++++++++++++++++++++++++++++
19
20 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` is not an iterator
21 --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:43
22 |
23 LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<<Self as Case1>::C as Iterator>::Item` is not an iterator
25 |
26 = help: the trait `Iterator` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
27 note: required by a bound in `Iterator`
28 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
29 |
30 LL | / pub trait Iterator {
31 LL | | /// The type of the elements being iterated over.
32 LL | | #[stable(feature = "rust1", since = "1.0.0")]
33 LL | | type Item;
34 ... |
35 LL | | }
36 LL | | }
37 | |_^ required by this bound in `Iterator`
38 help: consider further restricting the associated type
39 |
40 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Iterator {
41 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++
42
43 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
44 --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:93
45 |
46 LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
47 | ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
48 |
49 = help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
50 note: required by a bound in `Sync`
51 --> $SRC_DIR/core/src/marker.rs:LL:COL
52 |
53 LL | / pub unsafe auto trait Sync {
54 LL | | // FIXME(estebank): once support to add notes in `rustc_on_unimplemented`
55 LL | | // lands in beta, and it has been extended to check whether a closure is
56 LL | | // anywhere in the requirement chain, extend it as such (#48534):
57 ... |
58 LL | | // Empty
59 LL | | }
60 | |_^ required by this bound in `Sync`
61 help: consider further restricting the associated type
62 |
63 LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync {
64 | ++++++++++++++++++++++++++++++++++++++++++++++++++
65
66 error: aborting due to 3 previous errors
67
68 For more information about this error, try `rustc --explain E0277`.