You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//~^ ERROR: `SmartPointer` can only be derived on `struct`s that are generic over at least one type
28
+
#[repr(transparent)]
29
+
structNoGeneric<'a>(&'au8);
30
+
31
+
#[derive(SmartPointer)]
32
+
//~^ ERROR: exactly one generic parameters when there are at least two generic type parameters should be designated as `#[pointee]` in order to derive `SmartPointer` traits
Copy file name to clipboardexpand all lines: tests/ui/deriving/deriving-smart-pointer-neg.stderr
+23-9
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ LL | #[derive(SmartPointer)]
6
6
|
7
7
= note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)
8
8
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
10
10
--> $DIR/deriving-smart-pointer-neg.rs:12:10
11
11
|
12
12
LL | #[derive(SmartPointer)]
@@ -22,60 +22,74 @@ LL | #[derive(SmartPointer)]
22
22
|
23
23
= note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)
24
24
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
26
26
--> $DIR/deriving-smart-pointer-neg.rs:26:10
27
27
|
28
28
LL | #[derive(SmartPointer)]
29
29
| ^^^^^^^^^^^^
30
30
|
31
31
= note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)
32
32
33
+
error: exactly one generic parameters when there are at least two generic type parameters should be designated as `#[pointee]` in order 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
0 commit comments