]> git.proxmox.com Git - rustc.git/blob - src/test/ui/kindck/kindck-impl-type-params.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / kindck / kindck-impl-type-params.stderr
1 error[E0277]: `T` cannot be sent between threads safely
2 --> $DIR/kindck-impl-type-params.rs:16:13
3 |
4 LL | let a = &t as &dyn Gettable<T>;
5 | ^^ `T` cannot be sent between threads safely
6 |
7 note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
8 --> $DIR/kindck-impl-type-params.rs:12:32
9 |
10 LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
11 | ^^^^^^^^^^^ ^^^^
12 = note: required for the cast to the object type `dyn Gettable<T>`
13 help: consider restricting type parameter `T`
14 |
15 LL | fn f<T: std::marker::Send>(val: T) {
16 | +++++++++++++++++++
17
18 error[E0277]: the trait bound `T: Copy` is not satisfied
19 --> $DIR/kindck-impl-type-params.rs:16:13
20 |
21 LL | let a = &t as &dyn Gettable<T>;
22 | ^^ the trait `Copy` is not implemented for `T`
23 |
24 note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
25 --> $DIR/kindck-impl-type-params.rs:12:32
26 |
27 LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
28 | ^^^^^^^^^^^ ^^^^
29 = note: required for the cast to the object type `dyn Gettable<T>`
30 help: consider restricting type parameter `T`
31 |
32 LL | fn f<T: std::marker::Copy>(val: T) {
33 | +++++++++++++++++++
34
35 error[E0277]: `T` cannot be sent between threads safely
36 --> $DIR/kindck-impl-type-params.rs:23:31
37 |
38 LL | let a: &dyn Gettable<T> = &t;
39 | ^^ `T` cannot be sent between threads safely
40 |
41 note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
42 --> $DIR/kindck-impl-type-params.rs:12:32
43 |
44 LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
45 | ^^^^^^^^^^^ ^^^^
46 = note: required for the cast to the object type `dyn Gettable<T>`
47 help: consider restricting type parameter `T`
48 |
49 LL | fn g<T: std::marker::Send>(val: T) {
50 | +++++++++++++++++++
51
52 error[E0277]: the trait bound `T: Copy` is not satisfied
53 --> $DIR/kindck-impl-type-params.rs:23:31
54 |
55 LL | let a: &dyn Gettable<T> = &t;
56 | ^^ the trait `Copy` is not implemented for `T`
57 |
58 note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
59 --> $DIR/kindck-impl-type-params.rs:12:32
60 |
61 LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
62 | ^^^^^^^^^^^ ^^^^
63 = note: required for the cast to the object type `dyn Gettable<T>`
64 help: consider restricting type parameter `T`
65 |
66 LL | fn g<T: std::marker::Copy>(val: T) {
67 | +++++++++++++++++++
68
69 error[E0277]: the trait bound `String: Copy` is not satisfied
70 --> $DIR/kindck-impl-type-params.rs:35:13
71 |
72 LL | let a = t as Box<dyn Gettable<String>>;
73 | ^ the trait `Copy` is not implemented for `String`
74 |
75 = help: the trait `Gettable<T>` is implemented for `S<T>`
76 note: required because of the requirements on the impl of `Gettable<String>` for `S<String>`
77 --> $DIR/kindck-impl-type-params.rs:12:32
78 |
79 LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
80 | ^^^^^^^^^^^ ^^^^
81 = note: required for the cast to the object type `dyn Gettable<String>`
82
83 error[E0277]: the trait bound `Foo: Copy` is not satisfied
84 --> $DIR/kindck-impl-type-params.rs:43:37
85 |
86 LL | let a: Box<dyn Gettable<Foo>> = t;
87 | ^ the trait `Copy` is not implemented for `Foo`
88 |
89 = help: the trait `Gettable<T>` is implemented for `S<T>`
90 note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>`
91 --> $DIR/kindck-impl-type-params.rs:12:32
92 |
93 LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
94 | ^^^^^^^^^^^ ^^^^
95 = note: required for the cast to the object type `dyn Gettable<Foo>`
96 help: consider annotating `Foo` with `#[derive(Copy)]`
97 |
98 LL | #[derive(Copy)]
99 |
100
101 error: aborting due to 6 previous errors
102
103 For more information about this error, try `rustc --explain E0277`.