@@ -4,7 +4,11 @@ error[E0277]: `T` cannot be sent between threads safely
44LL | let a = &t as &dyn Gettable<T>;
55 | ^^ `T` cannot be sent between threads safely
66 |
7- = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
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+ | ^^^^^^^^^^^ ^^^^
812 = note: required for the cast to the object type `dyn Gettable<T>`
913help: consider restricting type parameter `T`
1014 |
@@ -17,7 +21,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
1721LL | let a = &t as &dyn Gettable<T>;
1822 | ^^ the trait `Copy` is not implemented for `T`
1923 |
20- = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
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+ | ^^^^^^^^^^^ ^^^^
2129 = note: required for the cast to the object type `dyn Gettable<T>`
2230help: consider restricting type parameter `T`
2331 |
@@ -30,7 +38,11 @@ error[E0277]: `T` cannot be sent between threads safely
3038LL | let a: &dyn Gettable<T> = &t;
3139 | ^^ `T` cannot be sent between threads safely
3240 |
33- = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
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+ | ^^^^^^^^^^^ ^^^^
3446 = note: required for the cast to the object type `dyn Gettable<T>`
3547help: consider restricting type parameter `T`
3648 |
@@ -43,7 +55,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
4355LL | let a: &dyn Gettable<T> = &t;
4456 | ^^ the trait `Copy` is not implemented for `T`
4557 |
46- = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
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+ | ^^^^^^^^^^^ ^^^^
4763 = note: required for the cast to the object type `dyn Gettable<T>`
4864help: consider restricting type parameter `T`
4965 |
@@ -56,7 +72,11 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
5672LL | let a = t as Box<dyn Gettable<String>>;
5773 | ^ the trait `Copy` is not implemented for `String`
5874 |
59- = note: required because of the requirements on the impl of `Gettable<String>` for `S<String>`
75+ note: required because of the requirements on the impl of `Gettable<String>` for `S<String>`
76+ --> $DIR/kindck-impl-type-params.rs:14:32
77+ |
78+ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
79+ | ^^^^^^^^^^^ ^^^^
6080 = note: required for the cast to the object type `dyn Gettable<String>`
6181
6282error[E0277]: the trait bound `Foo: Copy` is not satisfied
@@ -65,7 +85,11 @@ error[E0277]: the trait bound `Foo: Copy` is not satisfied
6585LL | let a: Box<dyn Gettable<Foo>> = t;
6686 | ^ the trait `Copy` is not implemented for `Foo`
6787 |
68- = note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>`
88+ note: required because of the requirements on the impl of `Gettable<Foo>` for `S<Foo>`
89+ --> $DIR/kindck-impl-type-params.rs:14:32
90+ |
91+ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
92+ | ^^^^^^^^^^^ ^^^^
6993 = note: required for the cast to the object type `dyn Gettable<Foo>`
7094
7195error: aborting due to 6 previous errors
0 commit comments