]> git.proxmox.com Git - rustc.git/blame - src/test/ui/kindck/kindck-impl-type-params.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / kindck / kindck-impl-type-params.stderr
CommitLineData
b7449926 1error[E0277]: `T` cannot be sent between threads safely
0731742a 2 --> $DIR/kindck-impl-type-params.rs:18:13
b7449926 3 |
dc9dc135 4LL | 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
10help: consider restricting type parameter `T`
11 |
12LL | fn f<T: std::marker::Send>(val: T) {
13 | ^^^^^^^^^^^^^^^^^^^
b7449926
XL
14
15error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
0731742a 16 --> $DIR/kindck-impl-type-params.rs:18:13
b7449926 17 |
dc9dc135 18LL | 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
23help: consider restricting type parameter `T`
24 |
25LL | fn f<T: std::marker::Copy>(val: T) {
26 | ^^^^^^^^^^^^^^^^^^^
b7449926
XL
27
28error[E0277]: `T` cannot be sent between threads safely
dc9dc135 29 --> $DIR/kindck-impl-type-params.rs:25:31
b7449926 30 |
dc9dc135
XL
31LL | 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
37help: consider restricting type parameter `T`
38 |
39LL | fn g<T: std::marker::Send>(val: T) {
40 | ^^^^^^^^^^^^^^^^^^^
b7449926
XL
41
42error[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
45LL | 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
50help: consider restricting type parameter `T`
51 |
52LL | fn g<T: std::marker::Copy>(val: T) {
53 | ^^^^^^^^^^^^^^^^^^^
b7449926
XL
54
55error[E0477]: the type `&'a isize` does not fulfill the required lifetime
0731742a 56 --> $DIR/kindck-impl-type-params.rs:32:13
b7449926 57 |
dc9dc135 58LL | let a = &t as &dyn Gettable<&'a isize>;
b7449926
XL
59 | ^^
60 |
61 = note: type must satisfy the static lifetime
62
63error[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 66LL | 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
72error[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
75LL | 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
81error: aborting due to 7 previous errors
82
dfeec247
XL
83Some errors have detailed explanations: E0277, E0477.
84For more information about an error, try `rustc --explain E0277`.