Description
I tried this code:
https://github.com/posix4e/curl-rust/tree/bug_report
I expected the code not to compile but I didn't expect the Internal compiler error
posix4e@posix4e-P27GV2:~/projects/curl-rust$ env RUST_BACKTRACE=1 cargo build
Compiling curl v0.2.10 (file:///home/posix4e/projects/curl-rust)
src/http/mod.rs:2:42: 2:49 error: a type named Request
has already been imported in this module [E0252]
src/http/mod.rs:2 pub use self::multi_handle::{MultiHandle,Request};
^~~~~~~
src/http/mod.rs:2:42: 2:49 help: run rustc --explain E0252
to see a detailed explanation
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: run with RUST_BACKTRACE=1
for a backtrace
thread 'rustc' panicked at 'expected item, found unknown node (id=3851)', /home/posix4e/projects/rust/src/libsyntax/ast_map/mod.rs:332
stack backtrace:
1: 0x7f02eff0d5b9 - sys::backtrace::write::h96526d7dcbc5f6faw6r
2: 0x7f02eff15579 - panicking::on_panic::hcdc77e04cf287518HMw
3: 0x7f02efed6252 - rt::unwind::begin_unwind_inner::h7ccc30d268a3a8efRrw
4: 0x7f02efed6fe7 - rt::unwind::begin_unwind_fmt::h2ec8a131650af149Xqw
5: 0x7f02ed1a4b64 - ast_map::Map<'ast>::expect_item::hfb406d85511b04c5FNw
6: 0x7f02ef37cf0a - resolve_imports::ImportResolver<'a, 'b, 'tcx>::check_for_conflicting_import::h03562036ad6f88aeH4c
7: 0x7f02ef37c5ec - resolve_imports::ImportResolver<'a, 'b, 'tcx>::resolve_single_import::closure.15532
8: 0x7f02ef3790cc - resolve_imports::ImportResolver<'a, 'b, 'tcx>::resolve_import_for_module::h15a58882c8c6e191ydc
9: 0x7f02ef375804 - resolve_imports::ImportResolver<'a, 'b, 'tcx>::resolve_imports_for_module_subtree::h8bd9cce547237c7ad6b
10: 0x7f02ef375fc2 - resolve_imports::ImportResolver<'a, 'b, 'tcx>::resolve_imports_for_module_subtree::h8bd9cce547237c7ad6b
11: 0x7f02ef3bacdc - resolve_crate::h4f59efbbeb996186Tai
12: 0x7f02f04690f2 - driver::phase_3_run_analysis_passes::hcd64983a94b0e9d4GGa
13: 0x7f02f044df0c - driver::compile_input::h85473147cac01347Qba
14: 0x7f02f0504b21 - run_compiler::hc25313c6b9c01f72o6b
15: 0x7f02f0502372 - boxed::F.FnBox::call_box::h17665098688847960825
16: 0x7f02f0501b49 - rt::unwind::try::try_fn::h2206092922748658589
17: 0x7f02eff98958 - rust_try_inner
18: 0x7f02eff98945 - rust_try
19: 0x7f02eff01017 - rt::unwind::try::inner_try::h9e3d9920c93d0705Knw
20: 0x7f02f0501d7a - boxed::F.FnBox::call_box::h2296181531930544611
21: 0x7f02eff14241 - sys::thread::Thread::new::thread_start::h7015fc9523a995b50xv
22: 0x7f02ea8ae0a4 - start_thread
23: 0x7f02efb55cfc - clone
24: 0x0 -
Could not compile curl
.