@@ -25,32 +25,43 @@ LL | Cons(Box<ListCell<T>>),
2525 | ^
2626 |
2727 = 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
2940
3041error[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
3243 |
3344LL | struct WithBounds<T: Sized> {}
3445 | ^ unused type parameter
3546 |
3647 = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
3748
3849error[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
4051 |
4152LL | struct WithWhereBounds<T> where T: Sized {}
4253 | ^ unused type parameter
4354 |
4455 = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
4556
4657error[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
4859 |
4960LL | struct WithOutlivesBounds<T: 'static> {}
5061 | ^ unused type parameter
5162 |
5263 = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
5364
54- error: aborting due to 6 previous errors
65+ error: aborting due to 7 previous errors
5566
5667For more information about this error, try `rustc --explain E0392`.
0 commit comments