Skip to content

Commit daa8491

Browse files
committed
Update NLL tests
1 parent b81df6b commit daa8491

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/test/ui/kindck/kindck-impl-type-params.nll.stderr

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,50 @@
11
error[E0277]: `T` cannot be sent between threads safely
22
--> $DIR/kindck-impl-type-params.rs:18:13
33
|
4+
LL | fn f<T>(val: T) {
5+
| - help: consider restricting this bound: `T: std::marker::Send`
6+
LL | let t: S<T> = S(marker::PhantomData);
47
LL | let a = &t as &dyn Gettable<T>;
58
| ^^ `T` cannot be sent between threads safely
69
|
710
= help: the trait `std::marker::Send` is not implemented for `T`
8-
= help: consider adding a `where T: std::marker::Send` bound
911
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
1012
= note: required for the cast to the object type `dyn Gettable<T>`
1113

1214
error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
1315
--> $DIR/kindck-impl-type-params.rs:18:13
1416
|
17+
LL | fn f<T>(val: T) {
18+
| - help: consider restricting this bound: `T: std::marker::Copy`
19+
LL | let t: S<T> = S(marker::PhantomData);
1520
LL | let a = &t as &dyn Gettable<T>;
1621
| ^^ the trait `std::marker::Copy` is not implemented for `T`
1722
|
18-
= help: consider adding a `where T: std::marker::Copy` bound
1923
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
2024
= note: required for the cast to the object type `dyn Gettable<T>`
2125

2226
error[E0277]: `T` cannot be sent between threads safely
2327
--> $DIR/kindck-impl-type-params.rs:25:31
2428
|
29+
LL | fn g<T>(val: T) {
30+
| - help: consider restricting this bound: `T: std::marker::Send`
31+
LL | let t: S<T> = S(marker::PhantomData);
2532
LL | let a: &dyn Gettable<T> = &t;
2633
| ^^ `T` cannot be sent between threads safely
2734
|
2835
= help: the trait `std::marker::Send` is not implemented for `T`
29-
= help: consider adding a `where T: std::marker::Send` bound
3036
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
3137
= note: required for the cast to the object type `dyn Gettable<T>`
3238

3339
error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
3440
--> $DIR/kindck-impl-type-params.rs:25:31
3541
|
42+
LL | fn g<T>(val: T) {
43+
| - help: consider restricting this bound: `T: std::marker::Copy`
44+
LL | let t: S<T> = S(marker::PhantomData);
3645
LL | let a: &dyn Gettable<T> = &t;
3746
| ^^ the trait `std::marker::Copy` is not implemented for `T`
3847
|
39-
= help: consider adding a `where T: std::marker::Copy` bound
4048
= note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`
4149
= note: required for the cast to the object type `dyn Gettable<T>`
4250

0 commit comments

Comments
 (0)