Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - imports.rs:901: inconsistent resolution for an import #71423

Closed
yatesco opened this issue Apr 22, 2020 · 2 comments
Closed

BUG - imports.rs:901: inconsistent resolution for an import #71423

yatesco opened this issue Apr 22, 2020 · 2 comments

Comments

@yatesco
Copy link

yatesco commented Apr 22, 2020

I get an error when cross building (using the cross crate, but I don't think the problem is there):

❯ cross build --target x86_64-pc-windows-gnu --release
   Compiling fstrings v0.2.2
thread 'rustc' panicked at 'src/librustc_resolve/imports.rs:901: inconsistent resolution for an import', <::std::macros::panic macros>:2:4
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1052
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1426
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:204
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:224
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:476
  12: std::panicking::begin_panic
  13: rustc::util::bug::opt_span_bug_fmt::{{closure}}
  14: rustc::ty::context::tls::with_opt::{{closure}}
  15: rustc::ty::context::tls::with_opt
  16: rustc::util::bug::opt_span_bug_fmt
  17: rustc::util::bug::span_bug_fmt
  18: rustc_resolve::imports::ImportResolver::finalize_import
  19: rustc_resolve::imports::ImportResolver::finalize_imports
  20: rustc_resolve::Resolver::resolve_crate
  21: rustc_interface::passes::configure_and_expand_inner
  22: rustc_interface::passes::configure_and_expand::{{closure}}
  23: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new
  24: rustc_interface::passes::configure_and_expand
  25: rustc_interface::queries::Queries::expansion
  26: rustc_interface::interface::run_compiler_in_existing_thread_pool
  27: scoped_tls::ScopedKey<T>::set
  28: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.42.0 (b8cedc004 2020-03-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C linker=x86_64-w64-mingw32-gcc --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `fstrings`.

To reproduce this:

  • cargo new --bin test-bin
  • cargo install cross
  • add fstrings = "0.2" to Cargo.toml
  • add [build.env] passthrough = [ "RUST_BACKTRACE", ] to Cross.toml
  • RUST_BACKTRACE=1 cross build --target x86_64-pc-windows-gnu --release

Hope this helps - let me know if I can debug further.

@jonas-schievink
Copy link
Contributor

Duplicate of #56935

@jonas-schievink jonas-schievink marked this as a duplicate of #56935 Apr 22, 2020
@yatesco
Copy link
Author

yatesco commented Apr 22, 2020

(thanks @jonas-schievink - I couldn't find a duplicate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants