File: hr-associated-type-bound-param-2.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 893,176 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (100 lines) | stat: -rw-r--r-- 3,627 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
error[E0277]: the trait bound `str: Clone` is not satisfied
  --> $DIR/hr-associated-type-bound-param-2.rs:3:8
   |
LL |     T: Z<'a, u16>,
   |        ^^^^^^^^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
  --> $DIR/hr-associated-type-bound-param-2.rs:6:35
   |
LL | trait Z<'a, T: ?Sized>
   |       - required by a bound in this trait
...
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z`

error[E0277]: the trait bound `str: Clone` is not satisfied
  --> $DIR/hr-associated-type-bound-param-2.rs:17:14
   |
LL |     type W = str;
   |              ^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
  --> $DIR/hr-associated-type-bound-param-2.rs:6:35
   |
LL | trait Z<'a, T: ?Sized>
   |       - required by a bound in this trait
...
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z`

error[E0277]: the trait bound `str: Clone` is not satisfied
  --> $DIR/hr-associated-type-bound-param-2.rs:3:8
   |
LL |     T: Z<'a, u16>,
   |        ^^^^^^^^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
  --> $DIR/hr-associated-type-bound-param-2.rs:6:35
   |
LL | trait Z<'a, T: ?Sized>
   |       - required by a bound in this trait
...
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0277]: the trait bound `str: Clone` is not satisfied
  --> $DIR/hr-associated-type-bound-param-2.rs:10:10
   |
LL |         <T::W>::clone(x);
   |          ^^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z::W`
  --> $DIR/hr-associated-type-bound-param-2.rs:6:35
   |
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z::W`
LL | {
LL |     type W: ?Sized;
   |          - required by a bound in this associated type

error[E0277]: the trait bound `str: Clone` is not satisfied
  --> $DIR/hr-associated-type-bound-param-2.rs:10:9
   |
LL |         <T::W>::clone(x);
   |         ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
  --> $DIR/hr-associated-type-bound-param-2.rs:6:35
   |
LL | trait Z<'a, T: ?Sized>
   |       - required by a bound in this trait
...
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z`

error[E0277]: the trait bound `str: Clone` is not satisfied
  --> $DIR/hr-associated-type-bound-param-2.rs:22:10
   |
LL |     1u16.h("abc");
   |          ^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z::h`
  --> $DIR/hr-associated-type-bound-param-2.rs:6:35
   |
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z::h`
...
LL |     fn h(&self, x: &T::W) {
   |        - required by a bound in this associated function

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0277`.