Skip to content

ICE: type flags said there was an error, but now there is not #143419

Open
@Gelbpunkt

Description

@Gelbpunkt

Code

I encountered this during trying to re-build my rustc natively after bootstrapping it from x86_64. It compiles just fine until rustc_middle, which triggered this error.

I'm not sure how to reduce a rustc-internal crate for a MRE.

Meta

rustc --version --verbose:

rustc 1.88.0 (6b00bc388 2025-06-23) (Alpine Linux 1.88.0-r0)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: mips64-alpine-linux-musl
release: 1.88.0
LLVM version: 20.1.7

Error output

thread 'rustc' panicked at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/compiler/rustc_type_ir/src/visit.rs:369:17:
type flags said there was an error, but now there is not
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: please attach the file at `/home/bootstrapper/aports/main/rust/src/rustc-1.88.0-src/rustc-ice-2025-07-04T08_43_28-5019.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C linker=cc -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C split-debuginfo=off -C target-feature=-crt-static -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -Z on-broken-pipe=kill -Z binary-dep-depinfo -Z tls-model=initial-exec -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [type_op_prove_predicate] evaluating `type_op_prove_predicate` `ProvePredicate { predicate: Binder { value: TraitPredicate(<core::result::Result<ty::generic_args::GenericArg<'_>, rustc_type_ir::solve::NoSolution> as core::marker::Copy>, polarity:Positive), bound_vars: [] } }`
#1 [mir_borrowck] borrow-checking `query::queries::try_normalize_generic_arg_after_erasing_regions::provided_to_erased`
#2 [analysis] running analysis passes on this crate
end of query stack
Backtrace

thread 'rustc' panicked at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/compiler/rustc_type_ir/src/visit.rs:369:17:
type flags said there was an error, but now there is not
stack backtrace:
   0:       0xfff2f0a654 - <unknown>
   1:       0xfff2f0a54c - std::backtrace::Backtrace::force_capture::h7bc806466c7ada4c
   2:       0xffef2e6988 - <unknown>
   3:       0xfff2f39070 - std::panicking::rust_panic_with_hook::ha141d1e29aebdf4d
   4:       0xfff2f38ab0 - <unknown>
   5:       0xfff2f32cac - <unknown>
   6:       0xfff2f384a8 - __rustc[30f31e44393b6d21]::rust_begin_unwind
   7:       0xffef262fd4 - core::panicking::panic_fmt::hd9c04f9652809349
   8:       0xfff1ab40b4 - <unknown>
   9:       0xfff1d7809c - <unknown>
  10:       0xfff095ce44 - rustc_traits[d78d3f2be068cdcf]::type_op::type_op_prove_predicate
  11:       0xfff17a6c94 - <unknown>
  12:       0xfff1745764 - <unknown>
  13:       0xfff14cfa34 - rustc_query_system[4b7b70bec177b8ee]::query::plumbing::try_execute_query::<rustc_query_impl[525c5d0a46a8a31e]::DynamicConfig<rustc_query_system[4b7b70bec177b8ee]::query::caches::DefaultCache<rustc_type_ir[33d8f32a7726b8f7]::canonical::CanonicalQueryInput<rustc_middle[6a2df7201115868e]::ty::context::TyCtxt, rustc_middle[6a2df7201115868e]::ty::ParamEnvAnd<rustc_middle[6a2df7201115868e]::traits::query::type_op::DropckOutlives>>, rustc_middle[6a2df7201115868e]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[525c5d0a46a8a31e]::plumbing::QueryCtxt, false>
  14:       0xfff1848f64 - <unknown>
  15:       0xfff1d915f4 - <rustc_middle[6a2df7201115868e]::traits::query::type_op::ProvePredicate as rustc_trait_selection[ec4bad5e88d7b903]::traits::query::type_op::QueryTypeOp>::perform_query
  16:       0xfff0849a64 - <unknown>
  17:       0xfff080ef04 - <rustc_borrowck[a79de11e43ea584b]::type_check::TypeChecker as rustc_middle[6a2df7201115868e]::mir::visit::Visitor>::visit_place
  18:       0xfff0861264 - <rustc_borrowck[a79de11e43ea584b]::type_check::TypeChecker as rustc_middle[6a2df7201115868e]::mir::visit::Visitor>::visit_operand
  19:       0xfff085b3ec - <rustc_borrowck[a79de11e43ea584b]::type_check::TypeChecker as rustc_middle[6a2df7201115868e]::mir::visit::Visitor>::visit_rvalue
  20:       0xfff0855e2c - <rustc_borrowck[a79de11e43ea584b]::type_check::TypeChecker as rustc_middle[6a2df7201115868e]::mir::visit::Visitor>::visit_statement
  21:       0xfff0854ea0 - <rustc_borrowck[a79de11e43ea584b]::type_check::TypeChecker as rustc_middle[6a2df7201115868e]::mir::visit::Visitor>::visit_body
  22:       0xfff0806284 - <unknown>
  23:       0xfff08650e8 - <unknown>
  24:       0xfff08169e4 - rustc_borrowck[a79de11e43ea584b]::mir_borrowck
  25:       0xfff179bff4 - <unknown>
  26:       0xfff16f59a4 - <unknown>
  27:       0xfff15754fc - rustc_query_system[4b7b70bec177b8ee]::query::plumbing::try_execute_query::<rustc_query_impl[525c5d0a46a8a31e]::DynamicConfig<rustc_data_structures[cd03c0ffb1296099]::vec_cache::VecCache<rustc_hir[8d450c4f8d2e80a4]::hir_id::OwnerId, rustc_middle[6a2df7201115868e]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[4b7b70bec177b8ee]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[525c5d0a46a8a31e]::plumbing::QueryCtxt, false>
  28:       0xfff17e9ea8 - <unknown>
  29:       0xffef5d08c0 - <unknown>
  30:       0xffef685db4 - <unknown>
  31:       0xffef68a7b0 - rustc_interface[a6ec810f99644e35]::passes::analysis
  32:       0xfff17aa570 - <unknown>
  33:       0xfff17617dc - <unknown>
  34:       0xfff14a6c70 - rustc_query_system[4b7b70bec177b8ee]::query::plumbing::try_execute_query::<rustc_query_impl[525c5d0a46a8a31e]::DynamicConfig<rustc_query_system[4b7b70bec177b8ee]::query::caches::SingleCache<rustc_middle[6a2df7201115868e]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[525c5d0a46a8a31e]::plumbing::QueryCtxt, false>
  35:       0xfff17bccac - <unknown>
  36:       0xffef2f3074 - <unknown>
  37:       0xffef2ced44 - <unknown>
  38:       0xffef2ecbd8 - <unknown>
  39:       0xffef2d198c - <unknown>
  40:       0xffef2efc68 - <unknown>
  41:       0xfff2f3d434 - <unknown>
  42:       0xfff3ebcaa4 - <unknown>


rustc version: 1.88.0 (6b00bc388 2025-06-23) (Alpine Linux 1.88.0-r0)
platform: mips64-alpine-linux-musl

query stack during panic:
#0 [type_op_prove_predicate] evaluating `type_op_prove_predicate` `ProvePredicate { predicate: Binder { value: TraitPredicate(<core::result::Result<ty::generic_args::GenericArg<'_>, rustc_type_ir::solve::NoSolution> as core::marker::Copy>, polarity:Positive), bound_vars: [] } }`
#1 [mir_borrowck] borrow-checking `query::queries::try_normalize_generic_arg_after_erasing_regions::provided_to_erased`
#2 [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) ❄️S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.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