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
query_one takes &[&(dyn ToSql + Sync)], and i32 is indeed both ToSql and Sync, so this should be allowed, but r-a reports expected &(dyn ToSql + Sync), found &i32 [type-mismatch].
Note that you must have postgres = "0.19.3" in Cargo.toml to reproduce this. I do not know how to reproduce this without depending on the postgres crate. I tried creating a similar thing without dependencies but the issue did not reproduce.
Rust-analyzer emits a
type-mismatch
error for this code, which is accepted byrustc
:query_one
takes&[&(dyn ToSql + Sync)]
, andi32
is indeed bothToSql
andSync
, so this should be allowed, but r-a reportsexpected &(dyn ToSql + Sync), found &i32 [type-mismatch]
.Note that you must have
postgres = "0.19.3"
in Cargo.toml to reproduce this. I do not know how to reproduce this without depending on the postgres crate. I tried creating a similar thing without dependencies but the issue did not reproduce.rust-analyzer version: rust-analyzer 0.0.0 (a02b042 2022-08-03)
rustc version: rustc 1.62.0 (a8314ef7d 2022-06-27)
relevant settings: emacs lsp-mode with
'(lsp-rust-analyzer-proc-macro-enable t)
The text was updated successfully, but these errors were encountered: