Closed
Description
thread 'main' panicked at 'assertion failed: directive.imported_module.get().is_none()', librustc_resolve/resolve_imports.rs:851:17
Because of the following line:
use actix::prelude::*;
Related: actix/actix#161
The problem is actix::prelude has a module named actix and it causes a conflict with the crate name itself
Minimal example crate:
https://github.com/tmpolaczyk/actix_ice
Compiling actix_ice v0.1.0 (/home/tomasz/projects/actix_ice)
thread 'main' panicked at 'assertion failed: directive.imported_module.get().is_none()', librustc_resolve/resolve_imports.rs:851:17
stack backtrace:
0: 0x7f2878744c33 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h620b49fadf2653f7
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: 0x7f287873c318 - std::sys_common::backtrace::_print::h8d76406414198a4a
at libstd/sys_common/backtrace.rs:71
2: 0x7f2878741604 - std::panicking::default_hook::{{closure}}::h2753e227a7b45da6
at libstd/sys_common/backtrace.rs:59
at libstd/panicking.rs:211
3: 0x7f287874136d - std::panicking::default_hook::h660245de82f7f01f
at libstd/panicking.rs:227
4: 0x7f2874e75a71 - rustc::util::common::panic_hook::h6d7bcb89f236099f
5: 0x7f2878741de9 - std::panicking::rust_panic_with_hook::ha639f3e2142547ff
at libstd/panicking.rs:480
6: 0x7f28779e8437 - std::panicking::begin_panic::ha3da65e061e2cb62
7: 0x7f28779d2ec9 - rustc_resolve::resolve_imports::ImportResolver::finalize_imports::h285d5302ce08f489
8: 0x7f2877a42cbc - rustc_resolve::Resolver::resolve_crate::he7aa2b5b6a8d1eef
9: 0x7f2878a62159 - rustc::util::common::time::h2ab61a2d4448a2c6
10: 0x7f2878a55743 - rustc_driver::driver::phase_2_configure_and_expand::h69f9579ccecfd0b2
11: 0x7f2878a4fb1a - rustc_driver::driver::compile_input::h3230a6b57b4ebb33
12: 0x7f2878b2beb4 - rustc_driver::run_compiler_with_pool::h321cf47dec8431a3
13: 0x7f2878a86655 - <scoped_tls::ScopedKey<T>>::set::h545945df5034f475
14: 0x7f2878b2aeda - rustc_driver::run_compiler::h42e73d4126dd1a95
15: 0x7f2878a9e498 - syntax::with_globals::hf4e7008e8602f431
16: 0x7f287875f049 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
17: 0x7f2878b28f95 - rustc_driver::run::hbcb28c5139e6c00f
18: 0x7f2878b36b1b - rustc_driver::main::h5e64003027b9f5c5
19: 0x55c3a390f962 - std::rt::lang_start::{{closure}}::hef68d8e211d83376
20: 0x7f2878741712 - std::panicking::try::do_call::h704d683257f21b11
at libstd/rt.rs:59
at libstd/panicking.rs:310
21: 0x7f287875f049 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
22: 0x7f28787421a3 - std::rt::lang_start_internal::hb07e8289ccfeb1cc
at libstd/panicking.rs:289
at libstd/panic.rs:398
at libstd/rt.rs:58
23: 0x55c3a390f954 - main
24: 0x7f2878523b16 - __libc_start_main
25: 0x55c3a390f808 - <unknown>
query stack during panic:
end of query stack
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/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.32.0-nightly (f1e2fa8f0 2018-11-20) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `actix_ice`.
To learn more, run the command again with --verbose.
Affects beta and nightly.