Update NLL tests
This commit is contained in:
parent
b81df6b739
commit
daa8491648
1 changed files with 12 additions and 4 deletions
|
@ -1,42 +1,50 @@
|
|||
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`
|
||||
= help: consider adding a `where T: std::marker::Send` bound
|
||||
= 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`
|
||||
|
|
||||
= help: consider adding a `where T: std::marker::Copy` bound
|
||||
= 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`
|
||||
= help: consider adding a `where T: std::marker::Send` bound
|
||||
= 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`
|
||||
|
|
||||
= help: consider adding a `where T: std::marker::Copy` bound
|
||||
= 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>`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue