|
1 | 1 | error[E0277]: `T` cannot be sent between threads safely
|
2 | 2 | --> $DIR/kindck-impl-type-params.rs:18:13
|
3 | 3 | |
|
| 4 | +LL | fn f<T>(val: T) { |
| 5 | + | - help: consider restricting this bound: `T: std::marker::Send` |
| 6 | +LL | let t: S<T> = S(marker::PhantomData); |
4 | 7 | LL | let a = &t as &dyn Gettable<T>;
|
5 | 8 | | ^^ `T` cannot be sent between threads safely
|
6 | 9 | |
|
7 | 10 | = help: the trait `std::marker::Send` is not implemented for `T`
|
8 |
| - = help: consider adding a `where T: std::marker::Send` bound |
9 | 11 | = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
|
10 | 12 | = note: required for the cast to the object type `dyn Gettable<T>`
|
11 | 13 |
|
12 | 14 | error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
|
13 | 15 | --> $DIR/kindck-impl-type-params.rs:18:13
|
14 | 16 | |
|
| 17 | +LL | fn f<T>(val: T) { |
| 18 | + | - help: consider restricting this bound: `T: std::marker::Copy` |
| 19 | +LL | let t: S<T> = S(marker::PhantomData); |
15 | 20 | LL | let a = &t as &dyn Gettable<T>;
|
16 | 21 | | ^^ the trait `std::marker::Copy` is not implemented for `T`
|
17 | 22 | |
|
18 |
| - = help: consider adding a `where T: std::marker::Copy` bound |
19 | 23 | = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
|
20 | 24 | = note: required for the cast to the object type `dyn Gettable<T>`
|
21 | 25 |
|
22 | 26 | error[E0277]: `T` cannot be sent between threads safely
|
23 | 27 | --> $DIR/kindck-impl-type-params.rs:25:31
|
24 | 28 | |
|
| 29 | +LL | fn g<T>(val: T) { |
| 30 | + | - help: consider restricting this bound: `T: std::marker::Send` |
| 31 | +LL | let t: S<T> = S(marker::PhantomData); |
25 | 32 | LL | let a: &dyn Gettable<T> = &t;
|
26 | 33 | | ^^ `T` cannot be sent between threads safely
|
27 | 34 | |
|
28 | 35 | = help: the trait `std::marker::Send` is not implemented for `T`
|
29 |
| - = help: consider adding a `where T: std::marker::Send` bound |
30 | 36 | = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
|
31 | 37 | = note: required for the cast to the object type `dyn Gettable<T>`
|
32 | 38 |
|
33 | 39 | error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
|
34 | 40 | --> $DIR/kindck-impl-type-params.rs:25:31
|
35 | 41 | |
|
| 42 | +LL | fn g<T>(val: T) { |
| 43 | + | - help: consider restricting this bound: `T: std::marker::Copy` |
| 44 | +LL | let t: S<T> = S(marker::PhantomData); |
36 | 45 | LL | let a: &dyn Gettable<T> = &t;
|
37 | 46 | | ^^ the trait `std::marker::Copy` is not implemented for `T`
|
38 | 47 | |
|
39 |
| - = help: consider adding a `where T: std::marker::Copy` bound |
40 | 48 | = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
|
41 | 49 | = note: required for the cast to the object type `dyn Gettable<T>`
|
42 | 50 |
|
|
0 commit comments