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

error: internal compiler error: /checkout/src/librustc_typeck/check/mod.rs:626: escaping regions in predicate ... #43997

Closed
tmzt opened this issue Aug 20, 2017 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@tmzt
Copy link

tmzt commented Aug 20, 2017

I tried this code:

        fn resolve_props<I>(&mut self, props: I) -> impl IntoIterator<Item = PropValue>
          where I: IntoIterator<Item = Prop>

(see https://github.com/tmzt/isymtope/blob/compiler-bug-impl-intoiterator/src/processing/process_comp_def.rs#L123)

When I run the following command:

cargo test -- test_process_comp_def1

I expected to see this happen: It should compile the test correctly

Instead, this happened:

error: internal compiler error: /checkout/src/librustc_typeck/check/mod.rs:626: escaping regions in predicate Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { substs: Slice([_]), item_def_id: DefId { krate: CrateNum(2), node: DefIndex(1755) => core/7405dbf::iter[0]::traits[0]::IntoIterator[0]::Item[0] } }, (&str, std::option::Option<&parser::ast::ExprValue>))),depth=0)
   --> src/processing/process_comp_def.rs:123:53
    |
123 |         fn resolve_props<I>(&mut self, props: I) -> impl IntoIterator<Item = PropValue>
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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.21.0-nightly (59ccba995 2017-08-17) running on x86_64-unknown-linux-gnu

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:434:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: Could not compile `isymtope`.

Meta

rustc --version --verbose:

rustc 1.21.0-nightly (59ccba995 2017-08-17)
binary: rustc
commit-hash: 59ccba995de202fb9d9a8d795d2770fb2d199db0
commit-date: 2017-08-17
host: x86_64-unknown-linux-gnu
release: 1.21.0-nightly
LLVM version: 4.0

Backtrace:

(NOTE: omitted unrelated warnings)

error: internal compiler error: /checkout/src/librustc_typeck/check/mod.rs:626: escaping regions in predicate Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { substs: Slice([_]), item_def_id: DefId { krate: CrateNum(2), node: DefIndex(1755) => core/7405dbf::iter[0]::traits[0]::IntoIterator[0]::Item[0] } }, (&str, std::option::Option<&parser::ast::ExprValue>))),depth=0)
   --> src/processing/process_comp_def.rs:123:53
    |
123 |         fn resolve_props<I>(&mut self, props: I) -> impl IntoIterator<Item = PropValue>
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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.21.0-nightly (59ccba995 2017-08-17) running on x86_64-unknown-linux-gnu

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:434:8
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:391
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:611
   5: std::panicking::begin_panic
   6: rustc_errors::Handler::span_bug
   7: rustc::session::opt_span_bug_fmt::{{closure}}
   8: rustc::session::span_bug_fmt
   9: rustc_typeck::check::Inherited::register_predicate
  10: <rustc::ty::fold::BottomUpFolder<'a, 'gcx, 'tcx, F> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  11: rustc_typeck::check::check_fn
  12: rustc_typeck::check::typeck_tables_of::{{closure}}
  13: rustc_typeck::check::typeck_tables_of
  14: rustc::dep_graph::graph::DepGraph::with_task
  15: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  16: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  17: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  18: rustc_typeck::check::typeck_item_bodies
  19: rustc::dep_graph::graph::DepGraph::with_task
  20: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
  21: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
  22: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
  23: rustc_typeck::check_crate
  24: rustc::ty::context::TyCtxt::create_and_enter
  25: rustc_driver::driver::compile_input
  26: rustc_driver::run_compiler

error: Could not compile `isymtope`.

To learn more, run the command again with --verbose.
@kennytm
Copy link
Member

kennytm commented Aug 20, 2017

Duplicate of #42479

@Mark-Simulacrum Mark-Simulacrum added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Aug 20, 2017
@Mark-Simulacrum
Copy link
Member

Closing as a duplicate of #42479.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants