Skip to content

ICE unresolved lifetime (in associated type) #18790

Closed
@soltanmm

Description

@soltanmm

Code:

#![feature(associated_types)]
trait A<'a> {
    type Q: Iterator<&'a int>;
}
fn main () {}

Error:

<anon>:3:23: 3:25 error: internal compiler error: unresolved lifetime
<anon>:3     type Q: Iterator<&'a int>;

Backtrace:

   1:     0x7ff3d931a870 - rt::backtrace::imp::write::ha1b148d5659e7369scq
   2:     0x7ff3d931d8f0 - failure::on_fail::haa1e9903a1e49be43xq
   3:     0x7ff3dd619260 - unwind::begin_unwind_inner::h83515d866c2c115d7Rd
   4:     0x7ff3d9e67720 - unwind::begin_unwind::h11634960427402952657
   5:     0x7ff3d9e676a0 - diagnostic::SpanHandler::span_bug::h3cd372f8340096b1H6F
   6:     0x7ff3dde2b0b0 - driver::session::Session::span_bug::h867c27f18cd6f500K7C
   7:     0x7ff3de1a6540 - middle::typeck::astconv::ast_region_to_region::h6b1e06ca1c4e7b622f4
   8:     0x7ff3de2b4570 - middle::typeck::astconv::opt_ast_region_to_region::h1717688885595327538
   9:     0x7ff3de404860 - middle::typeck::astconv::ast_ty_to_ty::h5093721996080801609
  10:     0x7ff3ddfa3c60 - iter::Iterator::collect::h7680246454230240869
  11:     0x7ff3de403090 - middle::typeck::astconv::ast_path_substs::h2279510905236807983
  12:     0x7ff3de402f80 - middle::typeck::astconv::ast_path_to_trait_ref::h3145113657239123220
  13:     0x7ff3de402bd0 - middle::typeck::collect::conv_param_bounds::closure.139390
  14:     0x7ff3de2b9980 - iter::Iterator::collect::h3929901470560457665
  15:     0x7ff3de401870 - middle::typeck::collect::get_or_create_type_parameter_def::h9822470970510271779
  16:     0x7ff3de28fc60 - middle::typeck::collect::trait_def_of_item::h82887e5e4a8e6fb2Chl
  17:     0x7ff3de28cae0 - visit::walk_mod::h10353242499875702179
  18:     0x7ff3de28c680 - middle::typeck::collect::collect_item_types::hab5be411ffb1787dGUj
  19:     0x7ff3ddc7aba0 - util::common::time::h9224654027132542998
  20:     0x7ff3de472910 - middle::typeck::check_crate::h3589b45c93c0f41dJEp
  21:     0x7ff3de4db980 - driver::driver::phase_3_run_analysis_passes::hc1ae25a482972678JoC
  22:     0x7ff3de4d67e0 - driver::driver::compile_input::h9cb9d3f6e587c056u5B
  23:     0x7ff3de559ad0 - driver::run_compiler::h69d51b18e4e8ee93LVF
  24:     0x7ff3de5599c0 - driver::run::closure.146540
  25:     0x7ff3ddc93ae0 - task::TaskBuilder<S>::try_future::closure.104852
  26:     0x7ff3ddc938d0 - task::TaskBuilder<S>::spawn_internal::closure.104823
  27:     0x7ff3dd960cb0 - task::NativeSpawner.Spawner::spawn::closure.8456
  28:     0x7ff3dd66e7e0 - rust_try_inner
  29:     0x7ff3dd66e7d0 - rust_try
  30:     0x7ff3dd616be0 - unwind::try::h4cd7a18973931a6cPGd
  31:     0x7ff3dd616a70 - task::Task::run::h9a465bb23f137f5eFMc
  32:     0x7ff3dd9609f0 - task::NativeSpawner.Spawner::spawn::closure.8394
  33:     0x7ff3dd618280 - thread::thread_start::h1cae8127b9148be0U7c
  34:     0x7ff3d86c90c0 - start_thread
  35:     0x7ff3dd2e1f89 - __clone
  36:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions