Skip to content

Commit

Permalink
Fix error message about wildcard overrides (#1276)
Browse files Browse the repository at this point in the history
Co-authored-by: Austin Bonander <austin@launchbadge.com>
  • Loading branch information
jplatte and abonander committed Jun 15, 2021
1 parent 358b80f commit e33e451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sqlx-macros/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ where
for rust_col in &columns {
if rust_col.type_.is_wildcard() {
return Err(
"columns may not have wildcard overrides in `query!()` or `query_as!()"
"wildcard overrides are only allowed with an explicit record type, \
e.g. `query_as!()` and its variants"
.into(),
);
}
Expand Down

0 comments on commit e33e451

Please sign in to comment.