Skip to content

ICE: impl_trait_in_assoc_type: expected const for .. but found Lifetime(ReLateBound(.. #112873

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

#![feature(impl_trait_in_assoc_type)]
#![crate_type="lib"]

use std::future::Future;

trait Stream {}

trait X {
    type LineStream<'a, Repr>
    where
        Self: 'a;
    type LineStreamFut<'a, Repr>
    where
        Self: 'a;
}

struct Y;

impl X for Y {
    type LineStream<const N: usize> = impl Stream;
    type LineStreamFut<'a, Repr> = impl Future<Output = Self::LineStream<'a, Repr>>;
    fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
}

Meta

rustc --version --verbose:

rustc 1.72.0-nightly (fe7454bf4 2023-06-19)
binary: rustc
commit-hash: fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2
commit-date: 2023-06-19
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

Error output

error[E0407]: method `line_stream` is not a member of trait `X`
  --> treereduce.out:22:5
   |
22 |     fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `X`

error[E0053]: type `LineStream` has an incompatible generic parameter for trait `X`
  --> treereduce.out:20:21
   |
8  | trait X {
   |       -
9  |     type LineStream<'a, Repr>
   |                         ---- expected type parameter
...
19 | impl X for Y {
   | ------------
20 |     type LineStream<const N: usize> = impl Stream;
   |                     ^^^^^^^^^^^^^^ found const parameter of type `usize`
Backtrace

error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:927:9: expected const for `N/#0` (Const { ty: usize, kind: N/#0 }/0) but found Lifetime(ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:21 ~ treereduce[8792]::{impl#0}::line_stream::'a), 'a) })) when substituting substs=[ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:21 ~ treereduce[8792]::{impl#0}::line_stream::'a), 'a) }), Repr]

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/compiler/rustc_errors/src/lib.rs:1650:9
stack backtrace:
   0:     0x7fbf14967e31 - std::backtrace_rs::backtrace::libunwind::trace::hc8d4ad2a14f65431
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fbf14967e31 - std::backtrace_rs::backtrace::trace_unsynchronized::h326b777d861d8591
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fbf14967e31 - std::sys_common::backtrace::_print_fmt::h3bafaae756c128c8
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fbf14967e31 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbfb53abb829e3090
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fbf149c94bf - core::fmt::rt::Argument::fmt::hbc25620208c94907
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/core/src/fmt/rt.rs:138:9
   5:     0x7fbf149c94bf - core::fmt::write::h842938b56f07f8d1
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fbf1495a897 - std::io::Write::write_fmt::h060ac7fa800e697e
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/io/mod.rs:1714:15
   7:     0x7fbf14967c45 - std::sys_common::backtrace::_print::h2e12aae1a3d8a661
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fbf14967c45 - std::sys_common::backtrace::print::hb06c7d0ec2140cc1
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fbf1496a9f3 - std::panicking::default_hook::{{closure}}::h898b55a95da5e957
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/panicking.rs:269:22
  10:     0x7fbf1496a784 - std::panicking::default_hook::h1b11d1ae2f54045a
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/panicking.rs:288:9
  11:     0x7fbf17bb132b - rustc_driver_impl[9dfcd7c304b3bb61]::install_ice_hook::{closure#0}
  12:     0x7fbf1496b21e - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he83f1bde5034a09d
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/alloc/src/boxed.rs:2007:9
  13:     0x7fbf1496b21e - std::panicking::rust_panic_with_hook::h741bc1ab2860fb7b
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/panicking.rs:709:13
  14:     0x7fbf18091ed1 - std[abb75a50082018a4]::panicking::begin_panic::<rustc_errors[e04cfe73e37a0de6]::ExplicitBug>::{closure#0}
  15:     0x7fbf180912f6 - std[abb75a50082018a4]::sys_common::backtrace::__rust_end_short_backtrace::<std[abb75a50082018a4]::panicking::begin_panic<rustc_errors[e04cfe73e37a0de6]::ExplicitBug>::{closure#0}, !>
  16:     0x7fbf18131fd6 - std[abb75a50082018a4]::panicking::begin_panic::<rustc_errors[e04cfe73e37a0de6]::ExplicitBug>
  17:     0x7fbf1808daf4 - <rustc_errors[e04cfe73e37a0de6]::HandlerInner>::bug::<alloc[9a16a5a8a95115b9]::string::String>
  18:     0x7fbf1808d896 - <rustc_errors[e04cfe73e37a0de6]::Handler>::bug::<alloc[9a16a5a8a95115b9]::string::String>
  19:     0x7fbf18103dac - rustc_middle[4dbea4c58cd5496d]::util::bug::opt_span_bug_fmt::<rustc_span[1c3ddaf11d36dbe9]::span_encoding::Span>::{closure#0}
  20:     0x7fbf18100d5a - rustc_middle[4dbea4c58cd5496d]::ty::context::tls::with_opt::<rustc_middle[4dbea4c58cd5496d]::util::bug::opt_span_bug_fmt<rustc_span[1c3ddaf11d36dbe9]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7fbf18100d2a - rustc_middle[4dbea4c58cd5496d]::ty::context::tls::with_context_opt::<rustc_middle[4dbea4c58cd5496d]::ty::context::tls::with_opt<rustc_middle[4dbea4c58cd5496d]::util::bug::opt_span_bug_fmt<rustc_span[1c3ddaf11d36dbe9]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7fbf15e3aedd - rustc_middle[4dbea4c58cd5496d]::util::bug::bug_fmt
  23:     0x7fbf180e8692 - <rustc_middle[4dbea4c58cd5496d]::ty::subst::SubstFolder>::const_param_expected
  24:     0x7fbf15c04524 - <rustc_middle[4dbea4c58cd5496d]::ty::Ty as rustc_type_ir[4228058c2052fb2e]::fold::TypeSuperFoldable<rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt>>::try_super_fold_with::<rustc_middle[4dbea4c58cd5496d]::ty::subst::SubstFolder>
  25:     0x7fbf188f130a - <rustc_ty_utils[86fc3806fa3101f0]::opaque_types::OpaqueTypeCollector as rustc_type_ir[4228058c2052fb2e]::visit::TypeVisitor<rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt>>::visit_ty
  26:     0x7fbf188c29a3 - <rustc_middle[4dbea4c58cd5496d]::ty::Term as rustc_type_ir[4228058c2052fb2e]::visit::TypeVisitable<rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt>>::visit_with::<rustc_ty_utils[86fc3806fa3101f0]::opaque_types::OpaqueTypeCollector>
  27:     0x7fbf188c2317 - <rustc_middle[4dbea4c58cd5496d]::ty::PredicateKind as rustc_type_ir[4228058c2052fb2e]::visit::TypeVisitable<rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt>>::visit_with::<rustc_ty_utils[86fc3806fa3101f0]::opaque_types::OpaqueTypeCollector>
  28:     0x7fbf188f126b - <rustc_ty_utils[86fc3806fa3101f0]::opaque_types::OpaqueTypeCollector as rustc_type_ir[4228058c2052fb2e]::visit::TypeVisitor<rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt>>::visit_ty
  29:     0x7fbf188f1316 - <rustc_ty_utils[86fc3806fa3101f0]::opaque_types::OpaqueTypeCollector as rustc_type_ir[4228058c2052fb2e]::visit::TypeVisitor<rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt>>::visit_ty
  30:     0x7fbf188e5b93 - <rustc_middle[4dbea4c58cd5496d]::ty::sty::FnSig as rustc_type_ir[4228058c2052fb2e]::visit::TypeVisitable<rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt>>::visit_with::<rustc_ty_utils[86fc3806fa3101f0]::opaque_types::OpaqueTypeCollector>
  31:     0x7fbf188f08bb - <rustc_ty_utils[86fc3806fa3101f0]::opaque_types::OpaqueTypeCollector>::collect::<rustc_middle[4dbea4c58cd5496d]::ty::sty::FnSig>
  32:     0x7fbf188f0c16 - rustc_ty_utils[86fc3806fa3101f0]::opaque_types::opaque_types_defined_by
  33:     0x7fbf184f1f5f - rustc_query_impl[b317eb1b9c20b97f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b317eb1b9c20b97f]::query_impl::opaque_types_defined_by::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 16usize]>>
  34:     0x7fbf1847f5d2 - <rustc_query_impl[b317eb1b9c20b97f]::query_impl::opaque_types_defined_by::dynamic_query::{closure#2} as core[948dd6769780b703]::ops::function::FnOnce<(rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt, rustc_span[1c3ddaf11d36dbe9]::def_id::LocalDefId)>>::call_once
  35:     0x7fbf164d3d35 - rustc_query_system[4a1022ae5e7ed30e]::query::plumbing::try_execute_query::<rustc_query_impl[b317eb1b9c20b97f]::DynamicConfig<rustc_query_system[4a1022ae5e7ed30e]::query::caches::VecCache<rustc_span[1c3ddaf11d36dbe9]::def_id::LocalDefId, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[b317eb1b9c20b97f]::plumbing::QueryCtxt, false>
  36:     0x7fbf1847303c - rustc_query_impl[b317eb1b9c20b97f]::query_impl::opaque_types_defined_by::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7fbf1723ba07 - <rustc_infer[f970bc0a9213f150]::infer::InferCtxt>::opaque_type_origin
  38:     0x7fbf17263561 - <rustc_middle[4dbea4c58cd5496d]::ty::fold::BottomUpFolder<<rustc_infer[f970bc0a9213f150]::infer::InferCtxt>::replace_opaque_types_with_inference_vars<rustc_middle[4dbea4c58cd5496d]::ty::Ty>::{closure#3}, <rustc_infer[f970bc0a9213f150]::infer::InferCtxt>::replace_opaque_types_with_inference_vars<rustc_middle[4dbea4c58cd5496d]::ty::Ty>::{closure#1}, <rustc_infer[f970bc0a9213f150]::infer::InferCtxt>::replace_opaque_types_with_inference_vars<rustc_middle[4dbea4c58cd5496d]::ty::Ty>::{closure#2}> as rustc_type_ir[4228058c2052fb2e]::fold::FallibleTypeFolder<rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt>>::try_fold_ty
  39:     0x7fbf164a75fe - rustc_hir_typeck[3f7a91e8239326f9]::check::check_fn
  40:     0x7fbf16491b12 - rustc_hir_typeck[3f7a91e8239326f9]::typeck
  41:     0x7fbf15c0f45c - rustc_query_impl[b317eb1b9c20b97f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b317eb1b9c20b97f]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 8usize]>>
  42:     0x7fbf15c0f43e - <rustc_query_impl[b317eb1b9c20b97f]::query_impl::typeck::dynamic_query::{closure#2} as core[948dd6769780b703]::ops::function::FnOnce<(rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt, rustc_span[1c3ddaf11d36dbe9]::def_id::LocalDefId)>>::call_once
  43:     0x7fbf15ccc00d - rustc_query_system[4a1022ae5e7ed30e]::query::plumbing::try_execute_query::<rustc_query_impl[b317eb1b9c20b97f]::DynamicConfig<rustc_query_system[4a1022ae5e7ed30e]::query::caches::VecCache<rustc_span[1c3ddaf11d36dbe9]::def_id::LocalDefId, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[b317eb1b9c20b97f]::plumbing::QueryCtxt, false>
  44:     0x7fbf1751debf - rustc_query_impl[b317eb1b9c20b97f]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  45:     0x7fbf17d08c5b - rustc_middle[4dbea4c58cd5496d]::query::plumbing::query_get_at::<rustc_query_system[4a1022ae5e7ed30e]::query::caches::VecCache<rustc_span[1c3ddaf11d36dbe9]::def_id::LocalDefId, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 8usize]>>>
  46:     0x7fbf17d0ce10 - <rustc_hir_analysis[dd3baaa7863fd7e6]::collect::type_of::opaque::TaitConstraintLocator>::check
  47:     0x7fbf17d0c561 - <rustc_hir_analysis[dd3baaa7863fd7e6]::collect::type_of::opaque::TaitConstraintLocator as rustc_hir[26317474bf0577d0]::intravisit::Visitor>::visit_nested_impl_item
  48:     0x7fbf17c9e875 - rustc_hir[26317474bf0577d0]::intravisit::walk_item::<rustc_hir_analysis[dd3baaa7863fd7e6]::collect::type_of::opaque::TaitConstraintLocator>
  49:     0x7fbf17d0cc20 - rustc_hir_analysis[dd3baaa7863fd7e6]::collect::type_of::opaque::find_opaque_ty_constraints_for_tait
  50:     0x7fbf16dc3ff7 - rustc_hir_analysis[dd3baaa7863fd7e6]::collect::type_of::type_of
  51:     0x7fbf15d0f0fe - rustc_query_impl[b317eb1b9c20b97f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b317eb1b9c20b97f]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 8usize]>>
  52:     0x7fbf15d0ee30 - <rustc_query_impl[b317eb1b9c20b97f]::query_impl::type_of::dynamic_query::{closure#2} as core[948dd6769780b703]::ops::function::FnOnce<(rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt, rustc_span[1c3ddaf11d36dbe9]::def_id::DefId)>>::call_once
  53:     0x7fbf15c24c25 - rustc_query_system[4a1022ae5e7ed30e]::query::plumbing::try_execute_query::<rustc_query_impl[b317eb1b9c20b97f]::DynamicConfig<rustc_query_system[4a1022ae5e7ed30e]::query::caches::DefaultCache<rustc_span[1c3ddaf11d36dbe9]::def_id::DefId, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[b317eb1b9c20b97f]::plumbing::QueryCtxt, false>
  54:     0x7fbf1751ab41 - rustc_query_impl[b317eb1b9c20b97f]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  55:     0x7fbf16ab3086 - rustc_middle[4dbea4c58cd5496d]::query::plumbing::query_get_at::<rustc_query_system[4a1022ae5e7ed30e]::query::caches::DefaultCache<rustc_span[1c3ddaf11d36dbe9]::def_id::DefId, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 8usize]>>>
  56:     0x7fbf16aab1f2 - rustc_hir_analysis[dd3baaa7863fd7e6]::check::check::check_mod_item_types
  57:     0x7fbf1684d36c - rustc_query_impl[b317eb1b9c20b97f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b317eb1b9c20b97f]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 0usize]>>
  58:     0x7fbf1684d34e - <rustc_query_impl[b317eb1b9c20b97f]::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core[948dd6769780b703]::ops::function::FnOnce<(rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt, rustc_span[1c3ddaf11d36dbe9]::def_id::LocalDefId)>>::call_once
  59:     0x7fbf1626106f - rustc_query_system[4a1022ae5e7ed30e]::query::plumbing::try_execute_query::<rustc_query_impl[b317eb1b9c20b97f]::DynamicConfig<rustc_query_system[4a1022ae5e7ed30e]::query::caches::VecCache<rustc_span[1c3ddaf11d36dbe9]::def_id::LocalDefId, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[b317eb1b9c20b97f]::plumbing::QueryCtxt, false>
  60:     0x7fbf1751d9d2 - rustc_query_impl[b317eb1b9c20b97f]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  61:     0x7fbf16fc0d77 - <rustc_middle[4dbea4c58cd5496d]::hir::map::Map>::for_each_module::<rustc_hir_analysis[dd3baaa7863fd7e6]::check_crate::{closure#6}::{closure#0}>
  62:     0x7fbf16fc058d - <rustc_session[6943d071f88e0103]::session::Session>::time::<(), rustc_hir_analysis[dd3baaa7863fd7e6]::check_crate::{closure#6}>
  63:     0x7fbf16fbea57 - rustc_hir_analysis[dd3baaa7863fd7e6]::check_crate
  64:     0x7fbf16fb210a - rustc_interface[e09470a726831395]::passes::analysis
  65:     0x7fbf1701bc5a - rustc_query_impl[b317eb1b9c20b97f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b317eb1b9c20b97f]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 1usize]>>
  66:     0x7fbf1701bc49 - <rustc_query_impl[b317eb1b9c20b97f]::query_impl::analysis::dynamic_query::{closure#2} as core[948dd6769780b703]::ops::function::FnOnce<(rustc_middle[4dbea4c58cd5496d]::ty::context::TyCtxt, ())>>::call_once
  67:     0x7fbf172352b8 - rustc_query_system[4a1022ae5e7ed30e]::query::plumbing::try_execute_query::<rustc_query_impl[b317eb1b9c20b97f]::DynamicConfig<rustc_query_system[4a1022ae5e7ed30e]::query::caches::SingleCache<rustc_middle[4dbea4c58cd5496d]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[b317eb1b9c20b97f]::plumbing::QueryCtxt, false>
  68:     0x7fbf17235097 - rustc_query_impl[b317eb1b9c20b97f]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  69:     0x7fbf170c9735 - <rustc_middle[4dbea4c58cd5496d]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[9dfcd7c304b3bb61]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>>
  70:     0x7fbf170c86fe - rustc_span[1c3ddaf11d36dbe9]::set_source_map::<core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>, rustc_interface[e09470a726831395]::interface::run_compiler<core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>, rustc_driver_impl[9dfcd7c304b3bb61]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  71:     0x7fbf170c094f - std[abb75a50082018a4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e09470a726831395]::util::run_in_thread_pool_with_globals<rustc_interface[e09470a726831395]::interface::run_compiler<core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>, rustc_driver_impl[9dfcd7c304b3bb61]::run_compiler::{closure#1}>::{closure#0}, core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>>
  72:     0x7fbf170c02a5 - <<std[abb75a50082018a4]::thread::Builder>::spawn_unchecked_<rustc_interface[e09470a726831395]::util::run_in_thread_pool_with_globals<rustc_interface[e09470a726831395]::interface::run_compiler<core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>, rustc_driver_impl[9dfcd7c304b3bb61]::run_compiler::{closure#1}>::{closure#0}, core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[948dd6769780b703]::result::Result<(), rustc_span[1c3ddaf11d36dbe9]::ErrorGuaranteed>>::{closure#1} as core[948dd6769780b703]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  73:     0x7fbf149756a5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfae47fe9ce740873
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/alloc/src/boxed.rs:1993:9
  74:     0x7fbf149756a5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he31693b2021b043e
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/alloc/src/boxed.rs:1993:9
  75:     0x7fbf149756a5 - std::sys::unix::thread::Thread::new::thread_start::h34d9d520469b7d69
                               at /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/library/std/src/sys/unix/thread.rs:108:17
  76:     0x7fbf1470d44b - <unknown>
  77:     0x7fbf14790e40 - <unknown>
  78:                0x0 - <unknown>

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.72.0-nightly (fe7454bf4 2023-06-19) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [opaque_types_defined_by] computing the opaque types defined by `<impl at treereduce.out:19:1: 19:13>::line_stream`
#1 [typeck] type-checking `<impl at treereduce.out:19:1: 19:13>::line_stream`
#2 [type_of] computing type of `<impl at treereduce.out:19:1: 19:13>::LineStream::{opaque#0}`
#3 [check_mod_item_types] checking item types in top-level module
#4 [analysis] running analysis passes on this crate
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions