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
Improve error message for id_type and missing repr (#596)
* This piece of code will only fire if you are using id_type with repr(inttype).
Thus, print out what is actually required to fix this error.
* Add to docs
Copy file name to clipboardExpand all lines: src/attributes.rs
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2054,6 +2054,25 @@ assert_eq!(data, value);
2054
2054
# fn main() {}
2055
2055
```
2056
2056
2057
+
2058
+
When using `id_type` with non-unit variants, Deku requires [primitive representation](https://doc.rust-lang.org/reference/type-layout.html#primitive-representations).
2059
+
Deku uses this for calculating the discriminant when reading and writing.
0 commit comments