]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0277]: `T` cannot be sent between threads safely |
0731742a | 2 | --> $DIR/kindck-impl-type-params.rs:18:13 |
b7449926 | 3 | | |
dc9dc135 | 4 | LL | let a = &t as &dyn Gettable<T>; |
b7449926 XL |
5 | | ^^ `T` cannot be sent between threads safely |
6 | | | |
7 | = help: the trait `std::marker::Send` is not implemented for `T` | |
b7449926 XL |
8 | = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` |
9 | = note: required for the cast to the object type `dyn Gettable<T>` | |
ba9703b0 XL |
10 | help: consider restricting type parameter `T` |
11 | | | |
12 | LL | fn f<T: std::marker::Send>(val: T) { | |
13 | | ^^^^^^^^^^^^^^^^^^^ | |
b7449926 XL |
14 | |
15 | error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied | |
0731742a | 16 | --> $DIR/kindck-impl-type-params.rs:18:13 |
b7449926 | 17 | | |
dc9dc135 | 18 | LL | let a = &t as &dyn Gettable<T>; |
b7449926 XL |
19 | | ^^ the trait `std::marker::Copy` is not implemented for `T` |
20 | | | |
b7449926 XL |
21 | = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` |
22 | = note: required for the cast to the object type `dyn Gettable<T>` | |
ba9703b0 XL |
23 | help: consider restricting type parameter `T` |
24 | | | |
25 | LL | fn f<T: std::marker::Copy>(val: T) { | |
26 | | ^^^^^^^^^^^^^^^^^^^ | |
b7449926 XL |
27 | |
28 | error[E0277]: `T` cannot be sent between threads safely | |
dc9dc135 | 29 | --> $DIR/kindck-impl-type-params.rs:25:31 |
b7449926 | 30 | | |
dc9dc135 XL |
31 | LL | let a: &dyn Gettable<T> = &t; |
32 | | ^^ `T` cannot be sent between threads safely | |
b7449926 XL |
33 | | |
34 | = help: the trait `std::marker::Send` is not implemented for `T` | |
b7449926 XL |
35 | = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` |
36 | = note: required for the cast to the object type `dyn Gettable<T>` | |
ba9703b0 XL |
37 | help: consider restricting type parameter `T` |
38 | | | |
39 | LL | fn g<T: std::marker::Send>(val: T) { | |
40 | | ^^^^^^^^^^^^^^^^^^^ | |
b7449926 XL |
41 | |
42 | error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied | |
dc9dc135 | 43 | --> $DIR/kindck-impl-type-params.rs:25:31 |
b7449926 | 44 | | |
dc9dc135 XL |
45 | LL | let a: &dyn Gettable<T> = &t; |
46 | | ^^ the trait `std::marker::Copy` is not implemented for `T` | |
b7449926 | 47 | | |
b7449926 XL |
48 | = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>` |
49 | = note: required for the cast to the object type `dyn Gettable<T>` | |
ba9703b0 XL |
50 | help: consider restricting type parameter `T` |
51 | | | |
52 | LL | fn g<T: std::marker::Copy>(val: T) { | |
53 | | ^^^^^^^^^^^^^^^^^^^ | |
b7449926 XL |
54 | |
55 | error[E0477]: the type `&'a isize` does not fulfill the required lifetime | |
0731742a | 56 | --> $DIR/kindck-impl-type-params.rs:32:13 |
b7449926 | 57 | | |
dc9dc135 | 58 | LL | let a = &t as &dyn Gettable<&'a isize>; |
b7449926 XL |
59 | | ^^ |
60 | | | |
61 | = note: type must satisfy the static lifetime | |
62 | ||
63 | error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied | |
0731742a | 64 | --> $DIR/kindck-impl-type-params.rs:38:13 |
b7449926 | 65 | | |
dc9dc135 | 66 | LL | let a = t as Box<dyn Gettable<String>>; |
b7449926 XL |
67 | | ^ the trait `std::marker::Copy` is not implemented for `std::string::String` |
68 | | | |
69 | = note: required because of the requirements on the impl of `Gettable<std::string::String>` for `S<std::string::String>` | |
70 | = note: required for the cast to the object type `dyn Gettable<std::string::String>` | |
71 | ||
72 | error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied | |
dc9dc135 | 73 | --> $DIR/kindck-impl-type-params.rs:46:37 |
b7449926 | 74 | | |
dc9dc135 XL |
75 | LL | let a: Box<dyn Gettable<Foo>> = t; |
76 | | ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo` | |
b7449926 XL |
77 | | |
78 | = note: required because of the requirements on the impl of `Gettable<foo3::Foo>` for `S<foo3::Foo>` | |
79 | = note: required for the cast to the object type `dyn Gettable<foo3::Foo>` | |
80 | ||
81 | error: aborting due to 7 previous errors | |
82 | ||
dfeec247 XL |
83 | Some errors have detailed explanations: E0277, E0477. |
84 | For more information about an error, try `rustc --explain E0277`. |