如果我尝试使用SQLx Rust postgres特性,如下所示,
[dependencies]
sqlx = { version = "0.3.3", default-features=false , features=["runtime-async-std", "macros", "postgres", "all-type"] }然后我得到一个编译错误,如下所示
Compiling sqlx-core v0.3.4
error[E0658]: use of unstable library feature 'matches_macro'
--> /Users/asnimpansari/.cargo/registry/src/github.com-1ecc6299db9ec823/sqlx-core-0.3.4/src/postgres/value.rs:78:12
|
78 | if matches!(self.data, Some(PgData::Binary(_))) {
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.
error: could not compile `sqlx-core`.相反,如果我使用mysql而不是postgres,构建就会成功。
➜ ~ rustc -V
rustc 1.41.1 (f3e1a954d 2020-02-24)发布于 2020-04-18 14:59:00
SQLx仅支持最新版本的Rust。截至2020年4月14日,版本为1.42.0,该版本于3月9日发布。
此特定错误是因为matches!宏为stabilized in 1.42
https://stackoverflow.com/questions/61281893
复制相似问题