error[E0277]: `T` cannot be sent between threads safely --> $DIR/kindck-impl-type-params.rs:16:13 | LL | let a = &t as &dyn Gettable; | ^^ `T` cannot be sent between threads safely | note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} | ---- ^^^^^^^^^^^ ^^^^ | | | unsatisfied trait bound introduced here = note: required for the cast from `S` to the object type `dyn Gettable` help: consider restricting type parameter `T` | LL | fn f(val: T) { | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:16:13 | LL | let a = &t as &dyn Gettable; | ^^ the trait `Copy` is not implemented for `T` | note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} | ---- ^^^^^^^^^^^ ^^^^ | | | unsatisfied trait bound introduced here = note: required for the cast from `S` to the object type `dyn Gettable` help: consider restricting type parameter `T` | LL | fn f(val: T) { | +++++++++++++++++++ error[E0277]: `T` cannot be sent between threads safely --> $DIR/kindck-impl-type-params.rs:23:31 | LL | let a: &dyn Gettable = &t; | ^^ `T` cannot be sent between threads safely | note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} | ---- ^^^^^^^^^^^ ^^^^ | | | unsatisfied trait bound introduced here = note: required for the cast from `S` to the object type `dyn Gettable` help: consider restricting type parameter `T` | LL | fn g(val: T) { | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:23:31 | LL | let a: &dyn Gettable = &t; | ^^ the trait `Copy` is not implemented for `T` | note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} | ---- ^^^^^^^^^^^ ^^^^ | | | unsatisfied trait bound introduced here = note: required for the cast from `S` to the object type `dyn Gettable` help: consider restricting type parameter `T` | LL | fn g(val: T) { | +++++++++++++++++++ error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:35:13 | LL | let a = t as Box>; | ^ the trait `Copy` is not implemented for `String` | = help: the trait `Gettable` is implemented for `S` note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} | ---- ^^^^^^^^^^^ ^^^^ | | | unsatisfied trait bound introduced here = note: required for the cast from `S` to the object type `dyn Gettable` error[E0277]: the trait bound `Foo: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:43:37 | LL | let a: Box> = t; | ^ the trait `Copy` is not implemented for `Foo` | = help: the trait `Gettable` is implemented for `S` note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} | ---- ^^^^^^^^^^^ ^^^^ | | | unsatisfied trait bound introduced here = note: required for the cast from `S` to the object type `dyn Gettable` help: consider annotating `Foo` with `#[derive(Copy)]` | LL | #[derive(Copy)] | error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0277`.