Skip to content

Commit

Permalink
Add more debugging info to unresolved type declaration panic (#1416)
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte authored Sep 1, 2021
1 parent 135d16a commit d94c081
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sqlx-core/src/postgres/type_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,11 @@ impl PgType {

PgType::Custom(ty) => &ty.kind,

PgType::DeclareWithOid(_) | PgType::DeclareWithName(_) => {
unreachable!("(bug) use of unresolved type declaration [kind]")
PgType::DeclareWithOid(oid) => {
unreachable!("(bug) use of unresolved type declaration [oid={}]", oid);
}
PgType::DeclareWithName(name) => {
unreachable!("(bug) use of unresolved type declaration [name={}]", name);
}
}
}
Expand Down

0 comments on commit d94c081

Please sign in to comment.