@@ -25,32 +25,43 @@ LL | Cons(Box<ListCell<T>>),
25
25
| ^
26
26
|
27
27
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
28
- = note: all type parameters must be used in a non-recursive way in order to constrain its variance
28
+ = note: all type parameters must be used in a non-recursive way in order to constrain their variance
29
+
30
+ error: type parameter `T` is only used recursively
31
+ --> $DIR/variance-unused-type-param.rs:19:27
32
+ |
33
+ LL | struct SelfTyAlias<T>(Box<Self>);
34
+ | - ^^^^
35
+ | |
36
+ | type parameter must be used non-recursively in the definition
37
+ |
38
+ = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
39
+ = note: all type parameters must be used in a non-recursive way in order to constrain their variance
29
40
30
41
error[E0392]: type parameter `T` is never used
31
- --> $DIR/variance-unused-type-param.rs:19 :19
42
+ --> $DIR/variance-unused-type-param.rs:22 :19
32
43
|
33
44
LL | struct WithBounds<T: Sized> {}
34
45
| ^ unused type parameter
35
46
|
36
47
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
37
48
38
49
error[E0392]: type parameter `T` is never used
39
- --> $DIR/variance-unused-type-param.rs:22 :24
50
+ --> $DIR/variance-unused-type-param.rs:25 :24
40
51
|
41
52
LL | struct WithWhereBounds<T> where T: Sized {}
42
53
| ^ unused type parameter
43
54
|
44
55
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
45
56
46
57
error[E0392]: type parameter `T` is never used
47
- --> $DIR/variance-unused-type-param.rs:25 :27
58
+ --> $DIR/variance-unused-type-param.rs:28 :27
48
59
|
49
60
LL | struct WithOutlivesBounds<T: 'static> {}
50
61
| ^ unused type parameter
51
62
|
52
63
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
53
64
54
- error: aborting due to 6 previous errors
65
+ error: aborting due to 7 previous errors
55
66
56
67
For more information about this error, try `rustc --explain E0392`.
0 commit comments