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
// Generate explicit trait bound for serialize_as fields with field span
138
-
// This ensures errors point to the specific field when using #[diagnostic::do_not_recommend]
139
-
let column_name = field.column_name()?.to_ident()?;
140
-
let span = Span::mixed_site().located_at(field.span);
141
-
let ty_to_check = if treat_none_as_default_value {
142
-
inner_of_option_ty(ty)
143
-
}else{
144
-
ty
145
-
};
146
-
147
-
field_ty_bounds.push(quote_spanned!{span=>
148
-
#ty_to_check: diesel::expression::AsExpression<
149
-
<#table_name::#column_name as diesel::Expression>::SqlType
150
-
>
151
-
});
127
+
field_ty_bounds.push(generate_field_bound(
128
+
field,
129
+
table_name,
130
+
ty,
131
+
treat_none_as_default_value,
132
+
)?);
152
133
153
134
generate_borrowed_insert = false;// as soon as we hit one field with #[diesel(serialize_as)] there is no point in generating the impl of Insertable for borrowed structs
0 commit comments