Skip to content

Conversation

compiler-errors
Copy link
Member

Fixes #140785
Fixes #140730

See comment in code.

r? oli-obk

@compiler-errors compiler-errors marked this pull request as ready for review May 8, 2025 19:44
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 8, 2025
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented May 9, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 9, 2025

📌 Commit d288e3c has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 9, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 9, 2025
…e, r=oli-obk

Do not ICE when reassigning in GatherLocalsVisitor on the bad path

Fixes rust-lang#140785
Fixes rust-lang#140730

See comment in code.

r? oli-obk
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 9, 2025
…e, r=oli-obk

Do not ICE when reassigning in GatherLocalsVisitor on the bad path

Fixes rust-lang#140785
Fixes rust-lang#140730

See comment in code.

r? oli-obk
@compiler-errors
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 9, 2025
@compiler-errors
Copy link
Member Author

@bors r=oli-obk rollup

@bors
Copy link
Collaborator

bors commented May 14, 2025

📌 Commit a4707a4 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 14, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 14, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#140827 (Do not ICE when reassigning in GatherLocalsVisitor on the bad path)
 - rust-lang#140904 (Add an issue template for future-incompatible lints)
 - rust-lang#140953 (Fix a compiletest blessing message)
 - rust-lang#140973 (Update rustix to 1.0.7 for bootstrap)
 - rust-lang#140976 (Add `Ipv4Addr` and `Ipv6Addr` diagnostic items)
 - rust-lang#140988 (MaybeUninit::write: fix doc)
 - rust-lang#140989 (Suggest replace f with f: Box<f> when expr field is short hand)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#140827 (Do not ICE when reassigning in GatherLocalsVisitor on the bad path)
 - rust-lang#140904 (Add an issue template for future-incompatible lints)
 - rust-lang#140953 (Fix a compiletest blessing message)
 - rust-lang#140973 (Update rustix to 1.0.7 for bootstrap)
 - rust-lang#140976 (Add `Ipv4Addr` and `Ipv6Addr` diagnostic items)
 - rust-lang#140988 (MaybeUninit::write: fix doc)
 - rust-lang#140989 (Suggest replace f with f: Box<f> when expr field is short hand)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#140827 (Do not ICE when reassigning in GatherLocalsVisitor on the bad path)
 - rust-lang#140904 (Add an issue template for future-incompatible lints)
 - rust-lang#140953 (Fix a compiletest blessing message)
 - rust-lang#140973 (Update rustix to 1.0.7 for bootstrap)
 - rust-lang#140976 (Add `Ipv4Addr` and `Ipv6Addr` diagnostic items)
 - rust-lang#140988 (MaybeUninit::write: fix doc)
 - rust-lang#140989 (Suggest replace f with f: Box<f> when expr field is short hand)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit dcb808e into rust-lang:master May 15, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 15, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
Rollup merge of rust-lang#140827 - compiler-errors:gather-locals-twice, r=oli-obk

Do not ICE when reassigning in GatherLocalsVisitor on the bad path

Fixes rust-lang#140785
Fixes rust-lang#140730

See comment in code.

r? oli-obk
@cyrgani
Copy link
Contributor

cyrgani commented Jun 29, 2025

I think this might be worthy of a stable backport, given that the ICE is pretty easy to trigger (already 2 reports just today: #143188, #143209) and blocks any useful error message about the actual problem (see below).

Example backtrace

pub async fn auth_check<Fut, T>(f: fn() -> Fut)
where
    Fut: Future<Output = T>
{
    f().await == f().await;
}

produces

thread 'rustc' panicked at compiler/rustc_hir_typeck/src/gather_locals.rs:112:17:
assertion `left == right` failed
  left: Some(?31t)
 right: None
stack backtrace:
   0:     0x70cb3fd46543 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h46a716bba2450163
   1:     0x70cb40405947 - core::fmt::write::h275e5980d7008551
   2:     0x70cb414c16d1 - std::io::Write::write_fmt::h561a66a0340b6995
   3:     0x70cb3fd463a2 - std::sys::backtrace::BacktraceLock::print::hafb9d5969adc39a0
   4:     0x70cb3fd49f9a - std::panicking::default_hook::{{closure}}::hae2e97a5c4b2b777
   5:     0x70cb3fd49b1f - std::panicking::default_hook::h3db1b505cfc4eb79
   6:     0x70cb3ed75b93 - std[61bb86a81f0491]::panicking::update_hook::<alloc[7c55b5a5cf9e3c5f]::boxed::Box<rustc_driver_impl[b7d73271a09ede7d]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x70cb3fd4a813 - std::panicking::rust_panic_with_hook::h409da73ddef13937
   8:     0x70cb3fd4a50a - std::panicking::begin_panic_handler::{{closure}}::h159b61b27f96a9c2
   9:     0x70cb3fd46a09 - std::sys::backtrace::__rust_end_short_backtrace::h5b56844d75e766fc
  10:     0x70cb3fd4a1cd - __rustc[4794b31dd7191200]::rust_begin_unwind
  11:     0x70cb3c685620 - core::panicking::panic_fmt::hc8737e8cca20a7c8
  12:     0x70cb3e6f7faa - core::panicking::assert_failed_inner::h1eff0b41c54ffee0
  13:     0x70cb3fa7ce4b - core[105cb658ab12d76f]::panicking::assert_failed::<core[105cb658ab12d76f]::option::Option<rustc_middle[1134768a56a896b4]::ty::Ty>, core[105cb658ab12d76f]::option::Option<rustc_middle[1134768a56a896b4]::ty::Ty>>
  14:     0x70cb407ea3dd - <rustc_hir_typeck[69b4494f2e6af28b]::gather_locals::GatherLocalsVisitor as rustc_hir[6af8095ba2ab9d73]::intravisit::Visitor>::visit_pat
  15:     0x70cb40fc9fcf - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  16:     0x70cb40661742 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_overloaded_binop
  17:     0x70cb40fca185 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  18:     0x70cb3cb599e3 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_block
  19:     0x70cb40fc87b7 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  20:     0x70cb40fca967 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  21:     0x70cb3cb59ed0 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_block
  22:     0x70cb40fc87b7 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  23:     0x70cb407edca5 - rustc_hir_typeck[69b4494f2e6af28b]::check::check_fn
  24:     0x70cb40cad178 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_closure
  25:     0x70cb40fccf87 - <rustc_hir_typeck[69b4494f2e6af28b]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  26:     0x70cb407edca5 - rustc_hir_typeck[69b4494f2e6af28b]::check::check_fn
  27:     0x70cb407d8de7 - rustc_hir_typeck[69b4494f2e6af28b]::typeck_with_inspect::{closure#0}
  28:     0x70cb407d7ab6 - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>>
  29:     0x70cb407c9366 - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_data_structures[e24569e090b577b3]::vec_cache::VecCache<rustc_span[1f7aec696a0836ce]::def_id::LocalDefId, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[48caa8a8a4cfcb68]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  30:     0x70cb407c8dd2 - rustc_query_impl[6f0ca6887c150a69]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  31:     0x70cb40beebc1 - rustc_mir_build[66235fdd4417f78a]::thir::pattern::check_match::check_match
  32:     0x70cb40bee459 - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::check_match::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 1usize]>>
  33:     0x70cb40c16665 - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_data_structures[e24569e090b577b3]::vec_cache::VecCache<rustc_span[1f7aec696a0836ce]::def_id::LocalDefId, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[48caa8a8a4cfcb68]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  34:     0x70cb40c162a1 - rustc_query_impl[6f0ca6887c150a69]::query_impl::check_match::get_query_non_incr::__rust_end_short_backtrace
  35:     0x70cb4081a788 - rustc_mir_build[66235fdd4417f78a]::builder::build_mir
  36:     0x70cb40409aab - rustc_mir_transform[bc4f92cb7c061fd1]::mir_built
  37:     0x70cb40409a65 - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>>
  38:     0x70cb407c9366 - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_data_structures[e24569e090b577b3]::vec_cache::VecCache<rustc_span[1f7aec696a0836ce]::def_id::LocalDefId, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[48caa8a8a4cfcb68]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  39:     0x70cb407c8e92 - rustc_query_impl[6f0ca6887c150a69]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  40:     0x70cb4042feef - rustc_mir_transform[bc4f92cb7c061fd1]::ffi_unwind_calls::has_ffi_unwind_calls
  41:     0x70cb4042fa99 - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::has_ffi_unwind_calls::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 1usize]>>
  42:     0x70cb40c16665 - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_data_structures[e24569e090b577b3]::vec_cache::VecCache<rustc_span[1f7aec696a0836ce]::def_id::LocalDefId, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[48caa8a8a4cfcb68]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  43:     0x70cb40c16345 - rustc_query_impl[6f0ca6887c150a69]::query_impl::has_ffi_unwind_calls::get_query_non_incr::__rust_end_short_backtrace
  44:     0x70cb3dc61161 - rustc_mir_transform[bc4f92cb7c061fd1]::mir_promoted
  45:     0x70cb408bd792 - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 16usize]>>
  46:     0x70cb408bda24 - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_data_structures[e24569e090b577b3]::vec_cache::VecCache<rustc_span[1f7aec696a0836ce]::def_id::LocalDefId, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 16usize]>, rustc_query_system[48caa8a8a4cfcb68]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  47:     0x70cb408bd692 - rustc_query_impl[6f0ca6887c150a69]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  48:     0x70cb407ca66b - rustc_borrowck[177ef636edd0ce33]::mir_borrowck
  49:     0x70cb407ca59f - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>>
  50:     0x70cb407c9366 - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_data_structures[e24569e090b577b3]::vec_cache::VecCache<rustc_span[1f7aec696a0836ce]::def_id::LocalDefId, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[48caa8a8a4cfcb68]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  51:     0x70cb407c8d12 - rustc_query_impl[6f0ca6887c150a69]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  52:     0x70cb416547eb - rustc_hir_analysis[5a87eb6962d34b42]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  53:     0x70cb41654574 - rustc_hir_analysis[5a87eb6962d34b42]::collect::type_of::type_of_opaque
  54:     0x70cb41654437 - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>>
  55:     0x70cb408800bf - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_query_system[48caa8a8a4cfcb68]::query::caches::DefIdCache<rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  56:     0x70cb416d7dfc - rustc_query_impl[6f0ca6887c150a69]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  57:     0x70cb40886b48 - rustc_hir_analysis[5a87eb6962d34b42]::collect::type_of::type_of
  58:     0x70cb40881476 - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>>
  59:     0x70cb408800bf - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_query_system[48caa8a8a4cfcb68]::query::caches::DefIdCache<rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  60:     0x70cb4087fc6b - rustc_query_impl[6f0ca6887c150a69]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  61:     0x70cb41654d19 - rustc_hir_analysis[5a87eb6962d34b42]::check::check::check_opaque
  62:     0x70cb409ce682 - rustc_hir_analysis[5a87eb6962d34b42]::check::check::check_item_type
  63:     0x70cb40c199e9 - rustc_hir_analysis[5a87eb6962d34b42]::check::wfcheck::check_well_formed
  64:     0x70cb40c1704b - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 1usize]>>
  65:     0x70cb40c168f1 - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_data_structures[e24569e090b577b3]::vec_cache::VecCache<rustc_span[1f7aec696a0836ce]::def_id::LocalDefId, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[48caa8a8a4cfcb68]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  66:     0x70cb40c163e6 - rustc_query_impl[6f0ca6887c150a69]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  67:     0x70cb40c13d23 - rustc_hir_analysis[5a87eb6962d34b42]::check::wfcheck::check_mod_type_wf
  68:     0x70cb40c1375f - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 1usize]>>
  69:     0x70cb413eda84 - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_query_system[48caa8a8a4cfcb68]::query::caches::DefaultCache<rustc_span[1f7aec696a0836ce]::def_id::LocalModDefId, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  70:     0x70cb413ed811 - rustc_query_impl[6f0ca6887c150a69]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  71:     0x70cb407c6f72 - rustc_hir_analysis[5a87eb6962d34b42]::check_crate
  72:     0x70cb40de0237 - rustc_interface[a43b584b4c4124b4]::passes::run_required_analyses
  73:     0x70cb412edb5e - rustc_interface[a43b584b4c4124b4]::passes::analysis
  74:     0x70cb412edb35 - rustc_query_impl[6f0ca6887c150a69]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f0ca6887c150a69]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 0usize]>>
  75:     0x70cb412efc3a - rustc_query_system[48caa8a8a4cfcb68]::query::plumbing::try_execute_query::<rustc_query_impl[6f0ca6887c150a69]::DynamicConfig<rustc_query_system[48caa8a8a4cfcb68]::query::caches::SingleCache<rustc_middle[1134768a56a896b4]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[6f0ca6887c150a69]::plumbing::QueryCtxt, false>
  76:     0x70cb412ef90f - rustc_query_impl[6f0ca6887c150a69]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  77:     0x70cb415aa0c7 - rustc_interface[a43b584b4c4124b4]::passes::create_and_enter_global_ctxt::<core[105cb658ab12d76f]::option::Option<rustc_interface[a43b584b4c4124b4]::queries::Linker>, rustc_driver_impl[b7d73271a09ede7d]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  78:     0x70cb414fe966 - rustc_interface[a43b584b4c4124b4]::interface::run_compiler::<(), rustc_driver_impl[b7d73271a09ede7d]::run_compiler::{closure#0}>::{closure#1}
  79:     0x70cb414b523e - std[61bb86a81f0491]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[a43b584b4c4124b4]::util::run_in_thread_with_globals<rustc_interface[a43b584b4c4124b4]::util::run_in_thread_pool_with_globals<rustc_interface[a43b584b4c4124b4]::interface::run_compiler<(), rustc_driver_impl[b7d73271a09ede7d]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  80:     0x70cb414b56b4 - <<std[61bb86a81f0491]::thread::Builder>::spawn_unchecked_<rustc_interface[a43b584b4c4124b4]::util::run_in_thread_with_globals<rustc_interface[a43b584b4c4124b4]::util::run_in_thread_pool_with_globals<rustc_interface[a43b584b4c4124b4]::interface::run_compiler<(), rustc_driver_impl[b7d73271a09ede7d]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[105cb658ab12d76f]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  81:     0x70cb414b6aab - std::sys::pal::unix::thread::Thread::new::thread_start::h1822d22fde68314f
  82:     0x70cb3b28aaa4 - <unknown>
  83:     0x70cb3b317a34 - clone
  84:                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: rustc 1.88.0 (6b00bc388 2025-06-23) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2

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

query stack during panic:
#0 [typeck] type-checking `auth_check`
#1 [check_match] match-checking `auth_check`
... and 9 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: this path really should be doomed...
 --> src/lib.rs:5:15
  |
5 |     f().await == f().await;
  |               ^^
  |
note: delayed at compiler/rustc_hir_typeck/src/op.rs:1003:28 - disabled backtrace
 --> src/lib.rs:5:15
  |
5 |     f().await == f().await;
  |               ^^

error: internal compiler error: `fn(_) -> <_ as IntoFuture>::IntoFuture {<_ as IntoFuture>::into_future}` overridden by `fn(_) -> <_ as IntoFuture>::IntoFuture {<_ as IntoFuture>::into_future}` for HirId(DefId(0:3 ~ playground[cc9b]::auth_check).96) in DefId(0:7 ~ playground[cc9b]::auth_check::{closure#0})
 --> src/lib.rs:5:22
  |
5 |     f().await == f().await;
  |                      ^^^^^
  |
note: delayed at compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:159:28 - disabled backtrace
 --> src/lib.rs:5:22
  |
5 |     f().await == f().await;
  |                      ^^^^^

error: internal compiler error: `fn() -> Fut` overridden by `fn() -> Fut` for HirId(DefId(0:3 ~ playground[cc9b]::auth_check).58) in DefId(0:7 ~ playground[cc9b]::auth_check::{closure#0})
 --> src/lib.rs:5:18
  |
5 |     f().await == f().await;
  |                  ^
  |
note: delayed at compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:159:28 - disabled backtrace
 --> src/lib.rs:5:18
  |
5 |     f().await == f().await;
  |                  ^

error: internal compiler error: `Fut` overridden by `Fut` for HirId(DefId(0:3 ~ playground[cc9b]::auth_check).57) in DefId(0:7 ~ playground[cc9b]::auth_check::{closure#0})
 --> src/lib.rs:5:18
  |
5 |     f().await == f().await;
  |                  ^^^
  |
note: delayed at compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:159:28 - disabled backtrace
 --> src/lib.rs:5:18
  |
5 |     f().await == f().await;
  |                  ^^^

error: internal compiler error: `Fut` overridden by `Fut` for HirId(DefId(0:3 ~ playground[cc9b]::auth_check).97) in DefId(0:7 ~ playground[cc9b]::auth_check::{closure#0})
 --> src/lib.rs:5:22
  |
5 |     f().await == f().await;
  |                      ^^^^^
  |
note: delayed at compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:159:28 - disabled backtrace
 --> src/lib.rs:5:22
  |
5 |     f().await == f().await;
  |                      ^^^^^

error: internal compiler error: {OpaqueTypeKey { def_id: DefId(0:6 ~ playground[cc9b]::auth_check::{opaque#0}), args: [Fut/#0, T/#1] }: OpaqueHiddenType { span: src/lib.rs:1:1: 3:28 (#11), ty: ?0t }}
  |
  = note: delayed at compiler/rustc_infer/src/infer/opaque_types/table.rs:121:43 - disabled backtrace

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.88.0 (6b00bc388 2025-06-23) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2

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

query stack during panic:
end of query stack

@cyrgani cyrgani added the stable-nominated Nominated for backporting to the compiler in the stable channel. label Jun 29, 2025
@cuviper
Copy link
Member

cuviper commented Jun 29, 2025

It doesn't make sense to do stable and not beta, so...

@rustbot label beta-nominated

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 29, 2025
@cuviper
Copy link
Member

cuviper commented Jun 29, 2025

Sorry, nevermind, this already merged a while ago, well in time for 1.89-beta.

@rustbot label -beta-nominated

@rustbot rustbot removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 29, 2025
@apiraino
Copy link
Contributor

apiraino commented Jul 3, 2025

Stable backport declined as per compiler team on Zulip.

The patch itself is low-risk and the ICE backtraces cover useful messages but by the look of it, it doesn't look critical to justify a dot release.

@rustbot label -stable-nominated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE:gather_locals ICE: gather_locals
8 participants