-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
I have found these related issues/pull requests
I didn't find any
Description
The code provided in the reproduction steps fails to compile with:
error[E0308]: mismatched types
--> src/main.rs:44:17
|
44 | "#, &[1, 2, 3], &[Some(true), Some(false), None]).fetch_all(db).await;
| ^
| |
| expected `&[bool]`, found `&[Option<bool>; 3]`
| expected due to the type of this binding
|
= note: expected reference `&[bool]`
found reference `&[std::option::Option<bool>; 3]`
Reproduction steps
let r = sqlx::query!(r#"
SELECT * FROM unnest(
$1::bigint[],
$2::bool[]
) AS t(
user_id,
admin
)
"#, &[1, 2, 3], &[Some(true), Some(false), None]).fetch_all(db).await;SQLx version
0.8.3
Enabled SQLx features
["postgres", "runtime-tokio-rustls"]
Database server and version
postgres (PostgreSQL) 16.6
Operating system
Linux nixos-pc 6.12.16 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 21 13:01:47 UTC 2025 x86_64 GNU/Linux
Rust version
rustc 1.85.0 (4d91de4e4 2025-02-17)