Skip to content

ICE: assertion failed: value <= 0xFFFF_FF00 #132429

Closed
@matthiaskrgr

Description

@matthiaskrgr
Member

auto-reduced (treereduce-rust):

//@compile-flags: -Zunstable-options --edition=2024
trait ThreeCellFragment {
    fn ext_cells<'a>(
        &'a self,
    ) -> dyn ::core::future::Future<Output = impl IntoIterator<Item = u32>> + 'a {
    }
}

original:

trait Foo {
    type Output = ();
    type Residual = Error;


}

trait ThreeCellFragment {
    fn ext_cells<'a>(&'a self) -> dyn ::core::future::Future<Output = impl IntoIterator<Item = u32>> + 'a {
        self.ext_adjacent_cells(()| 3)
    }
}

Version information

rustc 1.84.0-nightly (a0d98ff0e 2024-10-31)
binary: rustc
commit-hash: a0d98ff0e5b6e1f2c63fd26f68484792621b235c
commit-date: 2024-10-31
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.1

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zunstable-options --edition=2024

Program output

error[E0601]: `main` function not found in crate `mvce`
 --> /tmp/icemaker_global_tempdir.Z3WLTaPlvXHE/rustc_testrunner_tmpdir_reporting.PBSlux1XttA8/mvce.rs:6:2
  |
6 | }
  |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.Z3WLTaPlvXHE/rustc_testrunner_tmpdir_reporting.PBSlux1XttA8/mvce.rs`

error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
 --> /tmp/icemaker_global_tempdir.Z3WLTaPlvXHE/rustc_testrunner_tmpdir_reporting.PBSlux1XttA8/mvce.rs:4:37
  |
4 |     ) -> dyn ::core::future::Future<Output = impl IntoIterator<Item = u32>> + 'a {
  |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

thread 'rustc' panicked at /rustc/a0d98ff0e5b6e1f2c63fd26f68484792621b235c/compiler/rustc_type_ir/src/lib.rs:81:1:
assertion failed: value <= 0xFFFF_FF00
stack backtrace:
   0:     0x7c8475a8624a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha5052ab5ff3c1e3a
   1:     0x7c847620440a - core::fmt::write::h5b239c6d20536434
   2:     0x7c847747bad1 - std::io::Write::write_fmt::h5ee6fc7528ddcfea
   3:     0x7c8475a860a2 - std::sys::backtrace::BacktraceLock::print::h9cda523fdf439d92
   4:     0x7c8475a885a6 - std::panicking::default_hook::{{closure}}::h3accbea1a715bd28
   5:     0x7c8475a883f0 - std::panicking::default_hook::h43a98dc7a72b0124
   6:     0x7c8474b0309f - std[88a4f7c45015b7fa]::panicking::update_hook::<alloc[d53568f9bdc8fcc8]::boxed::Box<rustc_driver_impl[24999c834b8e70e5]::install_ice_hook::{closure#0}>>::{closure#0}
   7:     0x7c8475a88cb8 - std::panicking::rust_panic_with_hook::h4b5dc9e94093f690
   8:     0x7c8475a88a56 - std::panicking::begin_panic_handler::{{closure}}::h19547257d9b32c91
   9:     0x7c8475a866f9 - std::sys::backtrace::__rust_end_short_backtrace::h6da94030023c8711
  10:     0x7c8475a8874c - rust_begin_unwind
  11:     0x7c84724e6ab0 - core::panicking::panic_fmt::hf0151e0c7f0d5c5e
  12:     0x7c847286b02c - core::panicking::panic::h72472e9c7be43318
  13:     0x7c8475a0daf5 - <rustc_ty_utils[3fcc7d7e75238657]::ty::ImplTraitInTraitFinder as rustc_type_ir[6089d2f146c41d2d]::visit::TypeVisitor<rustc_middle[34253ac2286cdc8a]::ty::context::TyCtxt>>::visit_ty::{closure#0}
  14:     0x7c84759e230d - <rustc_middle[34253ac2286cdc8a]::ty::generic_args::GenericArg as rustc_type_ir[6089d2f146c41d2d]::fold::TypeFoldable<rustc_middle[34253ac2286cdc8a]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[34253ac2286cdc8a]::ty::fold::RegionFolder>
  15:     0x7c84759e3969 - <&rustc_middle[34253ac2286cdc8a]::ty::list::RawList<(), rustc_middle[34253ac2286cdc8a]::ty::generic_args::GenericArg> as rustc_type_ir[6089d2f146c41d2d]::fold::TypeFoldable<rustc_middle[34253ac2286cdc8a]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[34253ac2286cdc8a]::ty::fold::RegionFolder>
  16:     0x7c847777b52b - <rustc_ty_utils[3fcc7d7e75238657]::ty::ImplTraitInTraitFinder as rustc_type_ir[6089d2f146c41d2d]::visit::TypeVisitor<rustc_middle[34253ac2286cdc8a]::ty::context::TyCtxt>>::visit_ty.cold
  17:     0x7c847777b118 - <rustc_ty_utils[3fcc7d7e75238657]::ty::ImplTraitInTraitFinder as rustc_type_ir[6089d2f146c41d2d]::visit::TypeVisitor<rustc_middle[34253ac2286cdc8a]::ty::context::TyCtxt>>::visit_ty.cold
  18:     0x7c8476406a36 - rustc_ty_utils[3fcc7d7e75238657]::ty::param_env
  19:     0x7c847640541b - rustc_query_impl[ccf433ecdc591e1e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ccf433ecdc591e1e]::query_impl::param_env::dynamic_query::{closure#2}::{closure#0}, rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 8usize]>>
  20:     0x7c84763ff96e - rustc_query_system[50fcb4015e274d01]::query::plumbing::try_execute_query::<rustc_query_impl[ccf433ecdc591e1e]::DynamicConfig<rustc_query_system[50fcb4015e274d01]::query::caches::DefIdCache<rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[ccf433ecdc591e1e]::plumbing::QueryCtxt, false>
  21:     0x7c84763ff43b - rustc_query_impl[ccf433ecdc591e1e]::query_impl::param_env::get_query_non_incr::__rust_end_short_backtrace
  22:     0x7c8476768200 - rustc_middle[34253ac2286cdc8a]::query::plumbing::query_get_at::<rustc_query_system[50fcb4015e274d01]::query::caches::DefIdCache<rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 8usize]>>>
  23:     0x7c847675c685 - rustc_hir_analysis[dee7e149b2d5b3a9]::check::wfcheck::check_trait
  24:     0x7c8473baa7cc - rustc_hir_analysis[dee7e149b2d5b3a9]::check::wfcheck::check_well_formed
  25:     0x7c84765bc347 - rustc_query_impl[ccf433ecdc591e1e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ccf433ecdc591e1e]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 1usize]>>
  26:     0x7c84765bba98 - rustc_query_system[50fcb4015e274d01]::query::plumbing::try_execute_query::<rustc_query_impl[ccf433ecdc591e1e]::DynamicConfig<rustc_query_system[50fcb4015e274d01]::query::caches::VecCache<rustc_span[a042b968840e004f]::def_id::LocalDefId, rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ccf433ecdc591e1e]::plumbing::QueryCtxt, false>
  27:     0x7c84765bb710 - rustc_query_impl[ccf433ecdc591e1e]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  28:     0x7c84765bc5c3 - rustc_hir_analysis[dee7e149b2d5b3a9]::check::wfcheck::check_mod_type_wf
  29:     0x7c84765bc3ef - rustc_query_impl[ccf433ecdc591e1e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ccf433ecdc591e1e]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 1usize]>>
  30:     0x7c8476e04203 - rustc_query_system[50fcb4015e274d01]::query::plumbing::try_execute_query::<rustc_query_impl[ccf433ecdc591e1e]::DynamicConfig<rustc_query_system[50fcb4015e274d01]::query::caches::DefaultCache<rustc_span[a042b968840e004f]::def_id::LocalModDefId, rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ccf433ecdc591e1e]::plumbing::QueryCtxt, false>
  31:     0x7c8476e03fb1 - rustc_query_impl[ccf433ecdc591e1e]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  32:     0x7c847663f5b3 - rustc_hir_analysis[dee7e149b2d5b3a9]::check_crate
  33:     0x7c84769e7a97 - rustc_interface[f07028e5bef72cf3]::passes::run_required_analyses
  34:     0x7c847707d71e - rustc_interface[f07028e5bef72cf3]::passes::analysis
  35:     0x7c847707d6f1 - rustc_query_impl[ccf433ecdc591e1e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ccf433ecdc591e1e]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 1usize]>>
  36:     0x7c84770e02ae - rustc_query_system[50fcb4015e274d01]::query::plumbing::try_execute_query::<rustc_query_impl[ccf433ecdc591e1e]::DynamicConfig<rustc_query_system[50fcb4015e274d01]::query::caches::SingleCache<rustc_middle[34253ac2286cdc8a]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ccf433ecdc591e1e]::plumbing::QueryCtxt, false>
  37:     0x7c84770dff8f - rustc_query_impl[ccf433ecdc591e1e]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  38:     0x7c8476fb2c61 - rustc_interface[f07028e5bef72cf3]::interface::run_compiler::<core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>, rustc_driver_impl[24999c834b8e70e5]::run_compiler::{closure#0}>::{closure#1}
  39:     0x7c8477002a14 - std[88a4f7c45015b7fa]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[f07028e5bef72cf3]::util::run_in_thread_with_globals<rustc_interface[f07028e5bef72cf3]::util::run_in_thread_pool_with_globals<rustc_interface[f07028e5bef72cf3]::interface::run_compiler<core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>, rustc_driver_impl[24999c834b8e70e5]::run_compiler::{closure#0}>::{closure#1}, core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>>::{closure#0}, core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>>
  40:     0x7c8477002e4d - <<std[88a4f7c45015b7fa]::thread::Builder>::spawn_unchecked_<rustc_interface[f07028e5bef72cf3]::util::run_in_thread_with_globals<rustc_interface[f07028e5bef72cf3]::util::run_in_thread_pool_with_globals<rustc_interface[f07028e5bef72cf3]::interface::run_compiler<core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>, rustc_driver_impl[24999c834b8e70e5]::run_compiler::{closure#0}>::{closure#1}, core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>>::{closure#0}, core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3494a61c23fe1d0a]::result::Result<(), rustc_span[a042b968840e004f]::ErrorGuaranteed>>::{closure#1} as core[3494a61c23fe1d0a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  41:     0x7c84770038f9 - std::sys::pal::unix::thread::Thread::new::thread_start::hfd205fc1309e19ca
  42:     0x7c847891e39d - <unknown>
  43:     0x7c84789a349c - <unknown>
  44:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

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: please make sure that you have updated to the latest nightly

note: rustc 1.84.0-nightly (a0d98ff0e 2024-10-31) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unstable-options -Z dump-mir-dir=dir

query stack during panic:
#0 [param_env] computing normalized predicates of `ThreeCellFragment::ext_cells`
#1 [check_well_formed] checking that `ThreeCellFragment` is well-formed
end of query stack
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0582, E0601.
For more information about an error, try `rustc --explain E0582`.

Activity

added
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.
on Oct 31, 2024
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Oct 31, 2024
matthiaskrgr

matthiaskrgr commented on Oct 31, 2024

@matthiaskrgr
MemberAuthor
theemathas

theemathas commented on Nov 1, 2024

@theemathas
Contributor

This code compiles in stable and beta. On nightly, it ICEs:

trait Trait {}
impl Trait for i32 {}

trait Trait2<T> {}
impl Trait2<i32> for f64 {}

trait ThreeCellFragment {
    fn ext_cells<'a>(x: &'a i32) -> Box<dyn Trait2<impl Trait + 'static> + 'static> {
        Box::new(1.0)
    }
}
cyrgani

cyrgani commented on Nov 1, 2024

@cyrgani
Contributor

@rustbot label: +regression-from-stable-to-nightly

added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Nov 1, 2024
fmease

fmease commented on Nov 1, 2024

@fmease
Member
added a commit that references this issue on Nov 2, 2024

Rollup merge of rust-lang#132466 - cjgillot:opaque-late, r=compiler-e…

8570a30
added a commit that references this issue on Nov 2, 2024

Rollup merge of rust-lang#132466 - cjgillot:opaque-late, r=compiler-e…

de36967
added a commit that references this issue on Nov 2, 2024

Rollup merge of rust-lang#132466 - cjgillot:opaque-late, r=compiler-e…

83d2ac7
added a commit that references this issue on Nov 2, 2024

Rollup merge of rust-lang#132466 - cjgillot:opaque-late, r=compiler-e…

020b63a

5 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @matthiaskrgr@theemathas@fmease@jieyouxu@rustbot

      Issue actions

        ICE: `assertion failed: value <= 0xFFFF_FF00` · Issue #132429 · rust-lang/rust