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
"DekuSize cannot be derived for types with seek attributes (seek_rewind, seek_from_current, seek_from_end, seek_from_start). Seek operations make size unpredictable.",
126
+
));
127
+
}
128
+
105
129
letDekuDataStruct{
106
130
imp: _,
107
131
wher: _,
108
132
ident: _,
109
133
fields,
110
134
} = DekuDataStruct::try_from(input)?;
111
135
136
+
for field in fields.iter().copied(){
137
+
iffield_has_seek_attributes(field){
138
+
let field_name = field
139
+
.ident
140
+
.as_ref()
141
+
.map(|i| i.to_string())
142
+
.unwrap_or_else(|| "unnamed field".to_string());
143
+
returnErr(syn::Error::new(
144
+
field.ty.span(),
145
+
format!("DekuSize cannot be derived for types with seek attributes on field '{}'. Seek operations make size unpredictable.", field_name),
146
+
));
147
+
}
148
+
}
149
+
112
150
let size_calculation = calculate_fields_size(fields.iter().copied(),&crate_);
"DekuSize cannot be derived for types with seek attributes (seek_rewind, seek_from_current, seek_from_end, seek_from_start). Seek operations make size unpredictable.",
error: DekuSize cannot be derived for types with seek attributes (seek_rewind, seek_from_current, seek_from_end, seek_from_start). Seek operations make size unpredictable.
error: DekuSize cannot be derived for types with seek attributes (seek_rewind, seek_from_current, seek_from_end, seek_from_start). Seek operations make size unpredictable.
0 commit comments