Skip to content

ICE: PointeeSized is removed during lowering #142652

@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

use std::marker::{MetaSized, PointeeSized};

pub trait Tr {}

pub fn metasized() -> Box<impl Tr + MetaSized> {
    if true {
        let x = metasized();
        let y: Box<dyn PointeeSized> = x;
    }
}
original code

original:

//@ compile-flags: --crate-type=lib
#![feature(sized_hierarchy)]

use std::marker::{MetaSized, PointeeSized};

pub trait Tr: PointeeSized {}
impl Tr for u32 {}

pub fn sized() -> Box<impl Tr + Sized> {
    if true {
        let x = Box::new;
        let y: Box<dyn Tr> = x;
    }
    Box::new(1u32)
}

pub fn neg_sized() -> Box<impl Tr + ?Sized> {
    if true {
    if true {
        let x = neg_sized();
        let y: Box<dyn Tr> = x;
//~^ ERROR: the size for values of type `impl Tr + MetaSized` cannot be known
    }
    Box::new(1u32)
}
    Box::new(1u32)
}

pub fn metasized() -> Box<impl Tr + MetaSized> {
    if true {
        let x = metasized();
        let y: Box<dyn PointeeSized> = x;
//~^ ERROR: the size for values of type `impl Tr + MetaSized` cannot be known
    }
    Box::new(1u32)
}

pub fn pointeesized() -> Box<impl Tr + PointeeSized> {
//~^ ERROR: the size for values of type `impl Tr + PointeeSized` cannot be known
    if true {
        let x = pointeesized();
//~^ ERROR: the size for values of type `impl Tr + PointeeSized` cannot be known
        let y: Box<dyn Tr> = x;
//~^ ERROR: the size for values of type `impl Tr + PointeeSized` cannot be known
//~| ERROR: the size for values of type `impl Tr + PointeeSized` cannot be known
    }
    std::marker(1u32)
}

Version information

rustc 1.89.0-nightly (f3db63916 2025-06-17)
binary: rustc
commit-hash: f3db63916e541ff039ac3cd7364c2d612749b61b
commit-date: 2025-06-17
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.7

Possibly related line of code:

obligation,
&mut candidates,
SizedTraitKind::MetaSized,
);
}
Some(LangItem::PointeeSized) => {
bug!("`PointeeSized` is removed during lowering");
}
Some(LangItem::Unsize) => {
self.assemble_candidates_for_unsizing(obligation, &mut candidates);
}
Some(LangItem::Destruct) => {
self.assemble_const_destruct_candidates(obligation, &mut candidates);

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

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

error[E0658]: use of unstable library feature `sized_hierarchy`
 --> /tmp/icemaker_global_tempdir.URnJzsKakkoA/rustc_testrunner_tmpdir_reporting.WKvoFiA4PCVB/mvce.rs:1:19
  |
1 | use std::marker::{MetaSized, PointeeSized};
  |                   ^^^^^^^^^
  |
  = help: add `#![feature(sized_hierarchy)]` to the crate attributes to enable
  = note: this compiler was built on 2025-06-17; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `sized_hierarchy`
 --> /tmp/icemaker_global_tempdir.URnJzsKakkoA/rustc_testrunner_tmpdir_reporting.WKvoFiA4PCVB/mvce.rs:1:30
  |
1 | use std::marker::{MetaSized, PointeeSized};
  |                              ^^^^^^^^^^^^
  |
  = help: add `#![feature(sized_hierarchy)]` to the crate attributes to enable
  = note: this compiler was built on 2025-06-17; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `sized_hierarchy`
 --> /tmp/icemaker_global_tempdir.URnJzsKakkoA/rustc_testrunner_tmpdir_reporting.WKvoFiA4PCVB/mvce.rs:5:37
  |
5 | pub fn metasized() -> Box<impl Tr + MetaSized> {
  |                                     ^^^^^^^^^
  |
  = help: add `#![feature(sized_hierarchy)]` to the crate attributes to enable
  = note: this compiler was built on 2025-06-17; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `sized_hierarchy`
 --> /tmp/icemaker_global_tempdir.URnJzsKakkoA/rustc_testrunner_tmpdir_reporting.WKvoFiA4PCVB/mvce.rs:8:24
  |
8 |         let y: Box<dyn PointeeSized> = x;
  |                        ^^^^^^^^^^^^
  |
  = help: add `#![feature(sized_hierarchy)]` to the crate attributes to enable
  = note: this compiler was built on 2025-06-17; consider upgrading it if it is out of date

error[E0308]: mismatched types
 --> /tmp/icemaker_global_tempdir.URnJzsKakkoA/rustc_testrunner_tmpdir_reporting.WKvoFiA4PCVB/mvce.rs:6:13
  |
6 |       if true {
  |  _____________^
7 | |         let x = metasized();
8 | |         let y: Box<dyn PointeeSized> = x;
9 | |     }
  | |_____^ expected `Box<_>`, found `()`
  |
  = note: expected struct `Box<_>`
          found unit type `()`
note: consider returning one of these bindings
 --> /tmp/icemaker_global_tempdir.URnJzsKakkoA/rustc_testrunner_tmpdir_reporting.WKvoFiA4PCVB/mvce.rs:7:13
  |
7 |         let x = metasized();
  |             ^
8 |         let y: Box<dyn PointeeSized> = x;
  |             ^

error: internal compiler error: compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs:104:21: `PointeeSized` is removed during lowering


thread 'rustc' panicked at compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs:104:21:
Box<dyn Any>
stack backtrace:
   0:     0x77466e2ff733 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hf6b8e560b2aaddbb
   1:     0x77466ea02cb7 - core::fmt::write::h512536cc11a37f1b
   2:     0x77466e2f5263 - std::io::Write::write_fmt::h187d52edf76d8022
   3:     0x77466e2ff592 - std::sys::backtrace::BacktraceLock::print::h35718979b39d7a33
   4:     0x77466e30317a - std::panicking::default_hook::{{closure}}::hc9d1a33dc3084210
   5:     0x77466e302cff - std::panicking::default_hook::hd6f81cf0b769b874
   6:     0x77466d3fbfd3 - std[9333bc5333c76994]::panicking::update_hook::<alloc[b28f35111b9cd925]::boxed::Box<rustc_driver_impl[9c8bc2fa3092ec28]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x77466e3039e3 - std::panicking::rust_panic_with_hook::hfaae9da84f44c762
   8:     0x77466d4394d1 - std[9333bc5333c76994]::panicking::begin_panic::<rustc_errors[9ff2d454b25693e0]::ExplicitBug>::{closure#0}
   9:     0x77466d42ddc6 - std[9333bc5333c76994]::sys::backtrace::__rust_end_short_backtrace::<std[9333bc5333c76994]::panicking::begin_panic<rustc_errors[9ff2d454b25693e0]::ExplicitBug>::{closure#0}, !>
  10:     0x77466d42a419 - std[9333bc5333c76994]::panicking::begin_panic::<rustc_errors[9ff2d454b25693e0]::ExplicitBug>
  11:     0x77466d442f51 - <rustc_errors[9ff2d454b25693e0]::diagnostic::BugAbort as rustc_errors[9ff2d454b25693e0]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x77466da0539a - rustc_middle[85dd1ff96372fcb9]::util::bug::opt_span_bug_fmt::<rustc_span[8686395707142f0d]::span_encoding::Span>::{closure#0}
  13:     0x77466d9e4f0a - rustc_middle[85dd1ff96372fcb9]::ty::context::tls::with_opt::<rustc_middle[85dd1ff96372fcb9]::util::bug::opt_span_bug_fmt<rustc_span[8686395707142f0d]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x77466d9e4d7b - rustc_middle[85dd1ff96372fcb9]::ty::context::tls::with_context_opt::<rustc_middle[85dd1ff96372fcb9]::ty::context::tls::with_opt<rustc_middle[85dd1ff96372fcb9]::util::bug::opt_span_bug_fmt<rustc_span[8686395707142f0d]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x77466aa974b0 - rustc_middle[85dd1ff96372fcb9]::util::bug::bug_fmt
  16:     0x77466f5d1012 - <rustc_trait_selection[1bf71f5d0561ea43]::traits::select::SelectionContext>::assemble_candidates
  17:     0x77466f5bb33b - <rustc_trait_selection[1bf71f5d0561ea43]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
  18:     0x77466f5b50d2 - <rustc_trait_selection[1bf71f5d0561ea43]::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
  19:     0x77466f5ad908 - <rustc_trait_selection[1bf71f5d0561ea43]::traits::select::SelectionContext>::evaluate_root_obligation
  20:     0x77466f5ab681 - rustc_traits[1a21419b77ff107b]::evaluate_obligation::evaluate_obligation
  21:     0x77466f5aafe9 - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::evaluate_obligation::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 2usize]>>
  22:     0x77466f5aa1c0 - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_query_system[f4098d1cf50ce8b4]::query::caches::DefaultCache<rustc_type_ir[b4dbc97a5541f9d3]::canonical::CanonicalQueryInput<rustc_middle[85dd1ff96372fcb9]::ty::context::TyCtxt, rustc_middle[85dd1ff96372fcb9]::ty::ParamEnvAnd<rustc_middle[85dd1ff96372fcb9]::ty::predicate::Predicate>>, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  23:     0x77466f5a9e1d - rustc_query_impl[335bf943c842fa2e]::query_impl::evaluate_obligation::get_query_non_incr::__rust_end_short_backtrace
  24:     0x77466f150500 - <rustc_trait_selection[1bf71f5d0561ea43]::traits::fulfill::FulfillProcessor as rustc_data_structures[f506b16921f7bc93]::obligation_forest::ObligationProcessor>::process_obligation
  25:     0x77466ea0598f - <rustc_data_structures[f506b16921f7bc93]::obligation_forest::ObligationForest<rustc_trait_selection[1bf71f5d0561ea43]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[1bf71f5d0561ea43]::traits::fulfill::FulfillProcessor>
  26:     0x77466edf59d5 - <rustc_trait_selection[1bf71f5d0561ea43]::traits::fulfill::FulfillmentContext<rustc_trait_selection[1bf71f5d0561ea43]::traits::FulfillmentError> as rustc_infer[ddf0a63745cc4bfe]::traits::engine::TraitEngine<rustc_trait_selection[1bf71f5d0561ea43]::traits::FulfillmentError>>::select_where_possible
  27:     0x77466f358ddc - rustc_hir_typeck[8542d075aaf85410]::check::check_fn
  28:     0x77466fbec414 - rustc_hir_typeck[8542d075aaf85410]::typeck_with_inspect::{closure#0}
  29:     0x77466fbd8a30 - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>>
  30:     0x77466ec40fee - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_data_structures[f506b16921f7bc93]::vec_cache::VecCache<rustc_span[8686395707142f0d]::def_id::LocalDefId, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f4098d1cf50ce8b4]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  31:     0x77466ec40a49 - rustc_query_impl[335bf943c842fa2e]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  32:     0x77466eebb033 - rustc_mir_build[a5fde2e8a03d2af7]::thir::pattern::check_match::check_match
  33:     0x77466eeba40f - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::check_match::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 1usize]>>
  34:     0x77466f22efb9 - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_data_structures[f506b16921f7bc93]::vec_cache::VecCache<rustc_span[8686395707142f0d]::def_id::LocalDefId, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[f4098d1cf50ce8b4]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  35:     0x77466f22ebfd - rustc_query_impl[335bf943c842fa2e]::query_impl::check_match::get_query_non_incr::__rust_end_short_backtrace
  36:     0x77466ef3395f - rustc_mir_build[a5fde2e8a03d2af7]::builder::build_mir
  37:     0x77466ea084b5 - rustc_mir_transform[b08f74cbe7b8eb7c]::mir_built
  38:     0x77466ea08487 - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>>
  39:     0x77466ec40fee - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_data_structures[f506b16921f7bc93]::vec_cache::VecCache<rustc_span[8686395707142f0d]::def_id::LocalDefId, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f4098d1cf50ce8b4]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  40:     0x77466ec40b09 - rustc_query_impl[335bf943c842fa2e]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  41:     0x77466ea269f8 - rustc_mir_transform[b08f74cbe7b8eb7c]::ffi_unwind_calls::has_ffi_unwind_calls
  42:     0x77466ea263f7 - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::has_ffi_unwind_calls::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 1usize]>>
  43:     0x77466f22efb9 - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_data_structures[f506b16921f7bc93]::vec_cache::VecCache<rustc_span[8686395707142f0d]::def_id::LocalDefId, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[f4098d1cf50ce8b4]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  44:     0x77466f22ec91 - rustc_query_impl[335bf943c842fa2e]::query_impl::has_ffi_unwind_calls::get_query_non_incr::__rust_end_short_backtrace
  45:     0x77466bf13101 - rustc_mir_transform[b08f74cbe7b8eb7c]::mir_promoted
  46:     0x77466ec4f112 - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 16usize]>>
  47:     0x77466ec4f3c2 - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_data_structures[f506b16921f7bc93]::vec_cache::VecCache<rustc_span[8686395707142f0d]::def_id::LocalDefId, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 16usize]>, rustc_query_system[f4098d1cf50ce8b4]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  48:     0x77466ec4f00c - rustc_query_impl[335bf943c842fa2e]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  49:     0x77466ec42328 - rustc_borrowck[b7336bd6ebc08484]::mir_borrowck
  50:     0x77466ec421d9 - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>>
  51:     0x77466ec40fee - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_data_structures[f506b16921f7bc93]::vec_cache::VecCache<rustc_span[8686395707142f0d]::def_id::LocalDefId, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f4098d1cf50ce8b4]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  52:     0x77466ec408cb - rustc_query_impl[335bf943c842fa2e]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  53:     0x77466fc94c4c - rustc_hir_analysis[b968f598936cb41b]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  54:     0x77466fc949f3 - rustc_hir_analysis[b968f598936cb41b]::collect::type_of::type_of_opaque
  55:     0x77466fc948eb - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>>
  56:     0x77466ead7165 - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_query_system[f4098d1cf50ce8b4]::query::caches::DefIdCache<rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  57:     0x77466fbf4bdb - rustc_query_impl[335bf943c842fa2e]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  58:     0x77466f2d0c0e - rustc_hir_analysis[b968f598936cb41b]::collect::type_of::type_of
  59:     0x77466ead86e8 - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>>
  60:     0x77466ead7165 - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_query_system[f4098d1cf50ce8b4]::query::caches::DefIdCache<rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  61:     0x77466ead6d1d - rustc_query_impl[335bf943c842fa2e]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  62:     0x77466fc95323 - rustc_hir_analysis[b968f598936cb41b]::check::check::check_opaque
  63:     0x77466f059a43 - rustc_hir_analysis[b968f598936cb41b]::check::check::check_item_type
  64:     0x77466f22fc16 - rustc_hir_analysis[b968f598936cb41b]::check::wfcheck::check_well_formed
  65:     0x77466f22f9db - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 1usize]>>
  66:     0x77466f22f20d - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_data_structures[f506b16921f7bc93]::vec_cache::VecCache<rustc_span[8686395707142f0d]::def_id::LocalDefId, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[f4098d1cf50ce8b4]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  67:     0x77466f22ed42 - rustc_query_impl[335bf943c842fa2e]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  68:     0x77466f22c4fc - rustc_hir_analysis[b968f598936cb41b]::check::wfcheck::check_type_wf
  69:     0x77466f22c39d - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::check_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 1usize]>>
  70:     0x77466fa64f30 - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_query_system[f4098d1cf50ce8b4]::query::caches::SingleCache<rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  71:     0x77466fa64d0e - rustc_query_impl[335bf943c842fa2e]::query_impl::check_type_wf::get_query_non_incr::__rust_end_short_backtrace
  72:     0x77466ec48d9c - rustc_hir_analysis[b968f598936cb41b]::check_crate
  73:     0x77466f2adae5 - rustc_interface[f2bb11eed659e555]::passes::analysis
  74:     0x77466f2ad709 - rustc_query_impl[335bf943c842fa2e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[335bf943c842fa2e]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 0usize]>>
  75:     0x77466fa6674e - rustc_query_system[f4098d1cf50ce8b4]::query::plumbing::try_execute_query::<rustc_query_impl[335bf943c842fa2e]::DynamicConfig<rustc_query_system[f4098d1cf50ce8b4]::query::caches::SingleCache<rustc_middle[85dd1ff96372fcb9]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[335bf943c842fa2e]::plumbing::QueryCtxt, false>
  76:     0x77466fa66336 - rustc_query_impl[335bf943c842fa2e]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  77:     0x77466fc72d9c - rustc_interface[f2bb11eed659e555]::passes::create_and_enter_global_ctxt::<core[b2a367d0a99567d4]::option::Option<rustc_interface[f2bb11eed659e555]::queries::Linker>, rustc_driver_impl[9c8bc2fa3092ec28]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  78:     0x77466fc64149 - rustc_interface[f2bb11eed659e555]::interface::run_compiler::<(), rustc_driver_impl[9c8bc2fa3092ec28]::run_compiler::{closure#0}>::{closure#1}
  79:     0x77466fc174b2 - std[9333bc5333c76994]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[f2bb11eed659e555]::util::run_in_thread_with_globals<rustc_interface[f2bb11eed659e555]::util::run_in_thread_pool_with_globals<rustc_interface[f2bb11eed659e555]::interface::run_compiler<(), rustc_driver_impl[9c8bc2fa3092ec28]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  80:     0x77466fc17196 - <<std[9333bc5333c76994]::thread::Builder>::spawn_unchecked_<rustc_interface[f2bb11eed659e555]::util::run_in_thread_with_globals<rustc_interface[f2bb11eed659e555]::util::run_in_thread_pool_with_globals<rustc_interface[f2bb11eed659e555]::interface::run_compiler<(), rustc_driver_impl[9c8bc2fa3092ec28]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b2a367d0a99567d4]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  81:     0x77466fc157bd - std::sys::pal::unix::thread::Thread::new::thread_start::hd9016145e0d739a0
  82:     0x7746696a07eb - <unknown>
  83:     0x77466972418c - <unknown>
  84:                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: please make sure that you have updated to the latest nightly

note: rustc 1.89.0-nightly (f3db63916 2025-06-17) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `metasized::{opaque#0}: core::marker::PointeeSized`
#1 [typeck] type-checking `metasized`
#2 [check_match] match-checking `metasized`
#3 [mir_built] building MIR for `metasized`
#4 [has_ffi_unwind_calls] checking if `metasized` contains FFI-unwind calls
#5 [mir_promoted] promoting constants in MIR for `metasized`
#6 [mir_borrowck] borrow-checking `metasized`
#7 [type_of_opaque] computing type of opaque `metasized::{opaque#0}`
#8 [type_of] computing type of `metasized::{opaque#0}`
#9 [check_well_formed] checking that `metasized::{opaque#0}` is well-formed
#10 [check_type_wf] checking that types are well-formed
#11 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 7 previous errors

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

@rustbot label +F-sized_hierarchy

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.F-sized_hierarchy`#![feature(sized_hierarchy)]`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