@@ -4,7 +4,11 @@ error[E0277]: `T` cannot be sent between threads safely
4
4
LL | let a = &t as &dyn Gettable<T>;
5
5
| ^^ `T` cannot be sent between threads safely
6
6
|
7
- = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
7
+ note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
8
+ --> $DIR/kindck-impl-type-params.rs:14:32
9
+ |
10
+ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
11
+ | ^^^^^^^^^^^ ^^^^
8
12
= note: required for the cast to the object type `dyn Gettable<T>`
9
13
help: consider restricting type parameter `T`
10
14
|
@@ -17,7 +21,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
17
21
LL | let a = &t as &dyn Gettable<T>;
18
22
| ^^ the trait `Copy` is not implemented for `T`
19
23
|
20
- = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
24
+ note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
25
+ --> $DIR/kindck-impl-type-params.rs:14:32
26
+ |
27
+ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
28
+ | ^^^^^^^^^^^ ^^^^
21
29
= note: required for the cast to the object type `dyn Gettable<T>`
22
30
help: consider restricting type parameter `T`
23
31
|
@@ -30,7 +38,11 @@ error[E0277]: `T` cannot be sent between threads safely
30
38
LL | let a: &dyn Gettable<T> = &t;
31
39
| ^^ `T` cannot be sent between threads safely
32
40
|
33
- = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
41
+ note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
42
+ --> $DIR/kindck-impl-type-params.rs:14:32
43
+ |
44
+ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
45
+ | ^^^^^^^^^^^ ^^^^
34
46
= note: required for the cast to the object type `dyn Gettable<T>`
35
47
help: consider restricting type parameter `T`
36
48
|
@@ -43,7 +55,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
43
55
LL | let a: &dyn Gettable<T> = &t;
44
56
| ^^ the trait `Copy` is not implemented for `T`
45
57
|
46
- = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
58
+ note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
59
+ --> $DIR/kindck-impl-type-params.rs:14:32
60
+ |
61
+ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
62
+ | ^^^^^^^^^^^ ^^^^
47
63
= note: required for the cast to the object type `dyn Gettable<T>`
48
64
help: consider restricting type parameter `T`
49
65
|
@@ -56,7 +72,11 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
56
72
LL | let a = t as Box<dyn Gettable<String>>;
57
73
| ^ the trait `Copy` is not implemented for `String`
58
74
|
59
- = note: required because of the requirements on the impl of `Gettable<String>` for `S<String>`
75
+ note: required because of the requirements on the impl of `Gettable<String>` for `S<String>`
76
+ --> $DIR/kindck-impl-type-params.rs:14:32
77
+ |
78
+ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
79
+ | ^^^^^^^^^^^ ^^^^
60
80
= note: required for the cast to the object type `dyn Gettable<String>`
61
81
62
82
error[E0277]: the trait bound `Foo: Copy` is not satisfied
@@ -65,7 +85,11 @@ error[E0277]: the trait bound `Foo: Copy` is not satisfied
65
85
LL | let a: Box<dyn Gettable<Foo>> = t;
66
86
| ^ the trait `Copy` is not implemented for `Foo`
67
87
|
68
- = note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>`
88
+ note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>`
89
+ --> $DIR/kindck-impl-type-params.rs:14:32
90
+ |
91
+ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
92
+ | ^^^^^^^^^^^ ^^^^
69
93
= note: required for the cast to the object type `dyn Gettable<Foo>`
70
94
71
95
error: aborting due to 6 previous errors
0 commit comments