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

assertion failed: self.is_collecting_in_band_lifetimes @rustc 1.30.0-nightly #53091

Closed
shekohex opened this issue Aug 5, 2018 · 1 comment
Closed

Comments

@shekohex
Copy link

shekohex commented Aug 5, 2018

i think it's about hidden lifetime parameters
i'm Trying Rust 2018 edition
I tried this code:

use std::collections::hash_map::Keys;
// ArcVec and  ArcHashMap is just a type alias
#[derive(Clone)]
pub struct FilesGuardService<'_> {
    paths: ArcVec<Keys<'_, String, String>>,
    hashes: ArcHashMap<String, String>,
}

I expected to see this happen: to work as expected
but when i change the lifetime to something like a it works

#[derive(Clone)]
pub struct FilesGuardService<'a> {
    paths: ArcVec<Keys<'a, String, String>>,
    hashes: ArcHashMap<String, String>,
}

Meta

rustc 1.30.0-nightly (7e8ca9f8b 2018-08-03)
binary: rustc
commit-hash: 7e8ca9f8bd8325398e76bc30ac09aab138bbb127
commit-date: 2018-08-03
host: x86_64-unknown-linux-gnu
release: 1.30.0-nightly
LLVM version: 7.0

Backtrace:

thread 'main' panicked at 'assertion failed: self.is_collecting_in_band_lifetimes', librustc/hir/lowering.rs:738:9
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:479
   6: std::panicking::begin_panic
   7: rustc::hir::lowering::LoweringContext::lower_lifetime
   8: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once
   9: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  10: rustc::hir::lowering::LoweringContext::lower_generics
  11: rustc::hir::lowering::LoweringContext::lower_item
  12: <rustc::hir::lowering::LoweringContext::lower_crate::ItemLowerer<'lcx, 'interner> as syntax::visit::Visitor<'lcx>>::visit_item
  13: syntax::visit::walk_item
  14: <rustc::hir::lowering::LoweringContext::lower_crate::ItemLowerer<'lcx, 'interner> as syntax::visit::Visitor<'lcx>>::visit_item
  15: rustc::hir::lowering::lower_crate
  16: rustc::util::common::time
  17: rustc_driver::driver::phase_2_configure_and_expand
  18: rustc_driver::driver::compile_input
  19: rustc_driver::run_compiler_with_pool
  20: <scoped_tls::ScopedKey<T>>::set
  21: syntax::with_globals
  22: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  23: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  24: rustc_driver::run
  25: rustc_driver::main
  26: std::rt::lang_start::{{closure}}
  27: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  28: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  29: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  30: main
  31: __libc_start_main
  32: <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.30.0-nightly (7e8ca9f8b 2018-08-03) 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 `cogg`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name ggserver cogg/src/server/server.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=caeed36abb997343 -C extra-filename=-caeed36abb997343 --out-dir /media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps -C incremental=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/incremental -L dependency=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps --extern bytes=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libbytes-127f57330cb2614c.rlib --extern protos=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libprotos-bbb805d07b1a101f.rlib --extern colored=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libcolored-97d2353e03f88efb.rlib --extern env_logger=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libenv_logger-c0253d7427ca4932.rlib --extern failure=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libfailure-8592148b33408ae9.rlib --extern failure_derive=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libfailure_derive-909ddbb056987232.so --extern fshash=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libfshash-ced94d73025e0a6f.rlib --extern futures=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libfutures-1cb57ddc4c559aad.rlib --extern grpcio=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libgrpcio-9ddda0c389d213c3.rlib --extern json=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libjson-98d840291e574801.rlib --extern log=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/liblog-ec46a7791176dd89.rlib --extern protobuf=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libprotobuf-6ef6353455652a35.rlib --extern serde=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libserde-9e89b185086676fd.rlib --extern serde_derive=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libserde_derive-51c52f82833ed074.so --extern serde_json=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libserde_json-898f0371196fa840.rlib --extern toml=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/deps/libtoml-69159f051b4339b9.rlib -L native=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/build/backtrace-sys-cce50b7c759d4874/out -L native=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/build/rust-crypto-09458b19c722df58/out -L native=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/build/grpcio-sys-e79c618176a27279/out/build -L native=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/build/grpcio-sys-e79c618176a27279/out/build/third_party/cares/cares/lib -L native=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/build/grpcio-sys-e79c618176a27279/out/build/third_party/zlib -L native=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/build/grpcio-sys-e79c618176a27279/out/build/third_party/boringssl/ssl -L native=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/build/grpcio-sys-e79c618176a27279/out/build/third_party/boringssl/crypto -L native=/media/shadykhalifa/pc/Projects/cogg-project/target/debug/build/grpcio-sys-e79c618176a27279/out` (exit code: 101)
@shekohex
Copy link
Author

shekohex commented Aug 5, 2018

Deplucated #52098
Closing

@shekohex shekohex closed this as completed Aug 5, 2018
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

1 participant