< 返回版块

Borber 发表于 2022-01-24 00:46

Tags:database, mongodb

rustc 1.60.0-nightly (17d29dcdc 2022-01-21) running on x86_64-pc-windows-msvc

[dependencies]
mongodb = "2.1.0"
tokio = { version = "1.15.0", features = ["full"] }
 Compiling mongodb v2.1.0
error: internal compiler error: compiler\rustc_mir_transform\src\generator.rs:755:13: Broken MIR: generator contains type ClientOptionsParser in MIR, but typeck only knows about {ResumeTy, impl AsRef<str>, std::option::Option<resolver_config::ResolverConfig>, bool, client::options::ClientOptions, [closure@C:\Users\BORBER\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\mongodb-2.1.0\src\client\options\mod.rs:1100:69: 1100:90], impl futures_util::Future<Output = std::result::Result<SrvResolver, error::Error>>, (), SrvResolver, &Vec<client::options::ServerAddress>, Vec<client::options::ServerAddress>, usize, &client::options::ServerAddress, client::options::ServerAddress, &str, impl futures_util::Future<Output = std::result::Result<ResolvedConfig, error::Error>>} and [impl AsRef<str>, std::option::Option<client::options::resolver_config::ResolverConfig>]
    --> C:\Users\BORBER\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\mongodb-2.1.0\src\client\options\mod.rs:1092:23
     |
1092 |       ) -> Result<Self> {
     |  _______________________^
1093 | |         let parser = ClientOptionsParser::parse(uri.as_ref())?;
1094 | |         let srv = parser.srv;
1095 | |         let auth_source_present = parser.auth_source.is_some();
...    |
1145 | |         Ok(options)
1146 | |     }
     | |_____^

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/17d29dcdce9b9e838635eb0adefd9b8b1588410b\compiler\rustc_errors\src\lib.rs:1115:9
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.60.0-nightly (17d29dcdc 2022-01-21) running on x86_64-pc-windows-msvc
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [optimized_mir] optimizing MIR for `client::options::<impl at C:\Users\BORBER\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\mongodb-2.1.0\src\client\options\mod.rs:973:1: 1261:2>::parse_uri::{closure#0}`
#1 [layout_of] computing layout of `[static generator@C:\Users\BORBER\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\mongodb-2.1.0\src\client\options\mod.rs:1092:23: 1146:6]`
#2 [layout_of] computing layout of `core::future::from_generator::GenFuture<[static generator@C:\Users\BORBER\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\mongodb-2.1.0\src\client\options\mod.rs:1092:23: 1146:6]>`
#3 [layout_of] computing layout of `impl core::future::future::Future<Output = [async output]>`
#4 [optimized_mir] optimizing MIR for `client::options::<impl at C:\Users\BORBER\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\mongodb-2.1.0\src\client\options\mod.rs:973:1: 1261:2>::parse_uri`
end of query stack
error: aborting due to previous error

error: could not compile `mongodb` due to previous error

评论区

写评论
作者 Borber 2022-01-24 03:10

用stable就好了....

1 共 1 条评论, 1 页