]> git.lizzy.rs Git - rust.git/blob - src/test/ui/kindck/kindck-impl-type-params.stderr
Compress amount of hashed bytes for `isize` values in StableHasher
[rust.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:18: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:14: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:18: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:14: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:25: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:14: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:25: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:14: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[E0477]: the type `&'a isize` does not fulfill the required lifetime
70   --> $DIR/kindck-impl-type-params.rs:32:13
71    |
72 LL |     let a = &t as &dyn Gettable<&'a isize>;
73    |             ^^
74    |
75    = note: type must satisfy the static lifetime
76
77 error[E0277]: the trait bound `String: Copy` is not satisfied
78   --> $DIR/kindck-impl-type-params.rs:38:13
79    |
80 LL |     let a = t as Box<dyn Gettable<String>>;
81    |             ^ the trait `Copy` is not implemented for `String`
82    |
83 note: required because of the requirements on the impl of `Gettable<String>` for `S<String>`
84   --> $DIR/kindck-impl-type-params.rs:14:32
85    |
86 LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
87    |                                ^^^^^^^^^^^     ^^^^
88    = note: required for the cast to the object type `dyn Gettable<String>`
89
90 error[E0277]: the trait bound `Foo: Copy` is not satisfied
91   --> $DIR/kindck-impl-type-params.rs:46:37
92    |
93 LL |     let a: Box<dyn Gettable<Foo>> = t;
94    |                                     ^ the trait `Copy` is not implemented for `Foo`
95    |
96 note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>`
97   --> $DIR/kindck-impl-type-params.rs:14:32
98    |
99 LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
100    |                                ^^^^^^^^^^^     ^^^^
101    = note: required for the cast to the object type `dyn Gettable<Foo>`
102
103 error: aborting due to 7 previous errors
104
105 Some errors have detailed explanations: E0277, E0477.
106 For more information about an error, try `rustc --explain E0277`.