blob: 777a553c2a58a7900cdaf40da1ec43fafc7e7b4c [file] [log] [blame]
error[E0277]: `T` cannot be sent between threads safely
--> $DIR/kindck-impl-type-params.rs:18:13
|
LL | fn f<T>(val: T) {
| - help: consider restricting this bound: `T: std::marker::Send`
LL | let t: S<T> = S(marker::PhantomData);
LL | let a = &t as &dyn Gettable<T>;
| ^^ `T` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `T`
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
= note: required for the cast to the object type `dyn Gettable<T>`
error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
--> $DIR/kindck-impl-type-params.rs:18:13
|
LL | fn f<T>(val: T) {
| - help: consider restricting this bound: `T: std::marker::Copy`
LL | let t: S<T> = S(marker::PhantomData);
LL | let a = &t as &dyn Gettable<T>;
| ^^ the trait `std::marker::Copy` is not implemented for `T`
|
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
= note: required for the cast to the object type `dyn Gettable<T>`
error[E0277]: `T` cannot be sent between threads safely
--> $DIR/kindck-impl-type-params.rs:25:31
|
LL | fn g<T>(val: T) {
| - help: consider restricting this bound: `T: std::marker::Send`
LL | let t: S<T> = S(marker::PhantomData);
LL | let a: &dyn Gettable<T> = &t;
| ^^ `T` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `T`
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
= note: required for the cast to the object type `dyn Gettable<T>`
error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
--> $DIR/kindck-impl-type-params.rs:25:31
|
LL | fn g<T>(val: T) {
| - help: consider restricting this bound: `T: std::marker::Copy`
LL | let t: S<T> = S(marker::PhantomData);
LL | let a: &dyn Gettable<T> = &t;
| ^^ the trait `std::marker::Copy` is not implemented for `T`
|
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
= note: required for the cast to the object type `dyn Gettable<T>`
error[E0477]: the type `&'a isize` does not fulfill the required lifetime
--> $DIR/kindck-impl-type-params.rs:32:13
|
LL | let a = &t as &dyn Gettable<&'a isize>;
| ^^
|
= note: type must satisfy the static lifetime
error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
--> $DIR/kindck-impl-type-params.rs:38:13
|
LL | let a = t as Box<dyn Gettable<String>>;
| ^ the trait `std::marker::Copy` is not implemented for `std::string::String`
|
= note: required because of the requirements on the impl of `Gettable<std::string::String>` for `S<std::string::String>`
= note: required for the cast to the object type `dyn Gettable<std::string::String>`
error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied
--> $DIR/kindck-impl-type-params.rs:46:37
|
LL | let a: Box<dyn Gettable<Foo>> = t;
| ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo`
|
= note: required because of the requirements on the impl of `Gettable<foo3::Foo>` for `S<foo3::Foo>`
= note: required for the cast to the object type `dyn Gettable<foo3::Foo>`
error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0277`.