@@ -6,7 +6,7 @@ LL | #[derive(SmartPointer)]
66 |
77 = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)
88
9- error: At least one generic type should be designated as `#[pointee]` in order to derive `SmartPointer` traits
9+ error: `SmartPointer` can only be derived on `struct`s with at least one field
1010 --> $DIR/deriving-smart-pointer-neg.rs:12:10
1111 |
1212LL | #[derive(SmartPointer)]
@@ -22,60 +22,74 @@ LL | #[derive(SmartPointer)]
2222 |
2323 = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)
2424
25- error: `SmartPointer` can only be derived on `struct`s with at least one field
25+ error: `SmartPointer` can only be derived on `struct`s that are generic over at least one type
2626 --> $DIR/deriving-smart-pointer-neg.rs:26:10
2727 |
2828LL | #[derive(SmartPointer)]
2929 | ^^^^^^^^^^^^
3030 |
3131 = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)
3232
33+ error: exactly one generic type parameter must be marked as #[pointee] to derive SmartPointer traits
34+ --> $DIR/deriving-smart-pointer-neg.rs:31:10
35+ |
36+ LL | #[derive(SmartPointer)]
37+ | ^^^^^^^^^^^^
38+ |
39+ = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)
40+
41+ error: only one type parameter can be marked as `#[pointee]` when deriving SmartPointer traits
42+ --> $DIR/deriving-smart-pointer-neg.rs:40:39
43+ |
44+ LL | struct TooManyPointees<'a, #[pointee] A: ?Sized, #[pointee] B: ?Sized>((&'a A, &'a B));
45+ | ^ ^
46+
3347error: `SmartPointer` can only be derived on `struct`s with `#[repr(transparent)]`
34- --> $DIR/deriving-smart-pointer-neg.rs:33 :10
48+ --> $DIR/deriving-smart-pointer-neg.rs:43 :10
3549 |
3650LL | #[derive(SmartPointer)]
3751 | ^^^^^^^^^^^^
3852 |
3953 = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)
4054
4155error: `derive(SmartPointer)` requires T to be marked `?Sized`
42- --> $DIR/deriving-smart-pointer-neg.rs:41 :36
56+ --> $DIR/deriving-smart-pointer-neg.rs:51 :36
4357 |
4458LL | struct NoMaybeSized<'a, #[pointee] T> {
4559 | ^
4660
4761error[E0392]: lifetime parameter `'a` is never used
48- --> $DIR/deriving-smart-pointer-neg.rs:22 :16
62+ --> $DIR/deriving-smart-pointer-neg.rs:15 :16
4963 |
5064LL | struct NoField<'a, #[pointee] T: ?Sized> {}
5165 | ^^ unused lifetime parameter
5266 |
5367 = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
5468
5569error[E0392]: type parameter `T` is never used
56- --> $DIR/deriving-smart-pointer-neg.rs:22 :31
70+ --> $DIR/deriving-smart-pointer-neg.rs:15 :31
5771 |
5872LL | struct NoField<'a, #[pointee] T: ?Sized> {}
5973 | ^ unused type parameter
6074 |
6175 = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
6276
6377error[E0392]: lifetime parameter `'a` is never used
64- --> $DIR/deriving-smart-pointer-neg.rs:29 :20
78+ --> $DIR/deriving-smart-pointer-neg.rs:22 :20
6579 |
6680LL | struct NoFieldUnit<'a, #[pointee] T: ?Sized>();
6781 | ^^ unused lifetime parameter
6882 |
6983 = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
7084
7185error[E0392]: type parameter `T` is never used
72- --> $DIR/deriving-smart-pointer-neg.rs:29 :35
86+ --> $DIR/deriving-smart-pointer-neg.rs:22 :35
7387 |
7488LL | struct NoFieldUnit<'a, #[pointee] T: ?Sized>();
7589 | ^ unused type parameter
7690 |
7791 = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
7892
79- error: aborting due to 10 previous errors
93+ error: aborting due to 12 previous errors
8094
8195For more information about this error, try `rustc --explain E0392`.
0 commit comments