Closed
Description
Code
First, feel free to close or something, it just said to report a bug but I'm not sure it should be reported...
The bug appears after changing Cargo.toml:
[dependencies]
actix-web = "4.0.0-beta.4"
actix-service = "2.0.0-beta.5"
(...)
[dev-dependencies]
actix-http = "2.2.0"
actix-rt = "2.2.0"
Failing to compile, but "working", and this is the one breaking it:
[dependencies]
actix-web = "4.0.0-beta.4"
actix-service = "2.0.0-beta.5"
(...)
[dev-dependencies]
actix-service = "1.0.6"
actix-http = "2.2.0"
actix-rt = "2.2.0"
The add of mismatched actix-service
in dev-deps cause the crash, the code hasn't changed in between (and was not compiling before and after of course so not sure it has any use).
Here is the code just in case, but like said, wasn't compiling anyway:
#[cfg(test)]
mod tests {
use super::*;
use actix_web::test;
use actix_service::Service;
use actix_http::Request;
pub async fn unit_test_main() -> impl Service<Request> {
let _guard = logger::create_basic_logger_std_out_std_err(None);
// Parsing configuration
let settings = Settings::new();
if settings.is_err() {
crit!("Wrong configuration: {:?}", settings.as_ref().err());
}
let config = settings.unwrap();
let port = config.port.clone();
let pool = create_config_from_settings(&config).create_pool(NoTls).unwrap();
let p = WebData {
config,
pool
};
test::init_service(
App::new()
.data(p.clone())
.service(
web::resource("/convert")
.route(web::post().to(convert::convert))
)
).await
}
}
Meta
rustc --version --verbose
:
rustc 1.50.0 (cb75ad5db 2021-02-10)
binary: rustc
commit-hash: cb75ad5db02783e8b0222fee363c5f63f7e2cf5b
commit-date: 2021-02-10
host: x86_64-pc-windows-msvc
release: 1.50.0
Error output
thread 'rustc' panicked at 'compiler\rustc_resolve\src\imports.rs:904:25: inconsistent resolution for an import', /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\compiler\rustc_middle\src\util\bug.rs:34:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
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.50.0 (cb75ad5db 2021-02-10) running on x86_64-pc-windows-msvc
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental -C target-cpu=native
note: some of the compiler flags provided by cargo are hidden
Backtrace
<backtrace>