Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ICE]: cannot convert 'a/#3 to a region vid #132766

Closed
wxie7 opened this issue Nov 8, 2024 · 3 comments · Fixed by #135000
Closed

[ICE]: cannot convert 'a/#3 to a region vid #132766

wxie7 opened this issue Nov 8, 2024 · 3 comments · Fixed by #135000
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@wxie7
Copy link

wxie7 commented Nov 8, 2024

Code

struct Foo;
impl Foo {
    #[allow(dead_code)]
    fn foo(self) {
        panic!("wrong method!")
    }
}
trait Trait {
    fn foo(self);
}
impl<'a, 'b, 'c> Trait for &'a &'b &'c Foo {
    async fn pass2<'a, 'b, 'c>(self) {}
}
fn main() {
    let x = &(&(&Foo));
    x.foo();
}

Meta

rustc --version --verbose:

rustc 1.84.0-nightly (b91a3a056 2024-11-07)
binary: rustc
commit-hash: b91a3a05609a46f73d23e0995ae7ebb4a4f429a5
commit-date: 2024-11-07
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.3

Error output

error[E0670]: `async fn` is not permitted in Rust 2015
  --> mutant.rs:12:5
   |
12 |     async fn pass2<'a, 'b, 'c>(self) {}
   |     ^^^^^ to use `async fn`, switch to Rust 2018 or later
   |
   = help: pass `--edition 2021` to `rustc`
   = note: for more on editions, read https://doc.rust-lang.org/edition-guide

error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope
  --> mutant.rs:12:20
   |
11 | impl<'a, 'b, 'c> Trait for &'a &'b &'c Foo {
   |      -- first declared here
12 |     async fn pass2<'a, 'b, 'c>(self) {}
   |                    ^^ lifetime `'a` already in scope

error[E0496]: lifetime name `'b` shadows a lifetime name that is already in scope
  --> mutant.rs:12:24
   |
11 | impl<'a, 'b, 'c> Trait for &'a &'b &'c Foo {
   |          -- first declared here
12 |     async fn pass2<'a, 'b, 'c>(self) {}
   |                        ^^ lifetime `'b` already in scope

error[E0496]: lifetime name `'c` shadows a lifetime name that is already in scope
  --> mutant.rs:12:28
   |
11 | impl<'a, 'b, 'c> Trait for &'a &'b &'c Foo {
   |              -- first declared here
12 |     async fn pass2<'a, 'b, 'c>(self) {}
   |                            ^^ lifetime `'c` already in scope

error[E0407]: method `pass2` is not a member of trait `Trait`
  --> mutant.rs:12:5
   |
12 |     async fn pass2<'a, 'b, 'c>(self) {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Trait`

error[E0046]: not all trait items implemented, missing: `foo`
  --> mutant.rs:11:1
   |
9  |     fn foo(self);
   |     ------------- `foo` from trait
10 | }
11 | impl<'a, 'b, 'c> Trait for &'a &'b &'c Foo {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation

error: internal compiler error: compiler/rustc_borrowck/src/universal_regions.rs:904:36: cannot convert `'a/#3` to a region vid

thread 'rustc' panicked at compiler/rustc_borrowck/src/universal_regions.rs:904:36:
Box<dyn Any>
stack backtrace:
   0:     0x7faaf585517a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hfadad24fb33e3d1a
   1:     0x7faaf60040a6 - core::fmt::write::h42d25fbda60cd99f
   2:     0x7faaf73c3351 - std::io::Write::write_fmt::hc2819193e80b365e
   3:     0x7faaf5854fd2 - std::sys::backtrace::BacktraceLock::print::h9450230402d77664
   4:     0x7faaf58574d6 - std::panicking::default_hook::{{closure}}::h739047d4d787c596
   5:     0x7faaf5857320 - std::panicking::default_hook::h203d1229480f37a5
   6:     0x7faaf48d2269 - std[56fe22ad9ea837fd]::panicking::update_hook::<alloc[b5641001d343df5f]::boxed::Box<rustc_driver_impl[945e9afaf49c7d35]::install_ice_hook::{closure#0}>>::{closure#0}
   7:     0x7faaf5857be8 - std::panicking::rust_panic_with_hook::h657fdcc17f7e2546
   8:     0x7faaf490c191 - std[56fe22ad9ea837fd]::panicking::begin_panic::<rustc_errors[43c84716ac990581]::ExplicitBug>::{closure#0}
   9:     0x7faaf48ff166 - std[56fe22ad9ea837fd]::sys::backtrace::__rust_end_short_backtrace::<std[56fe22ad9ea837fd]::panicking::begin_panic<rustc_errors[43c84716ac990581]::ExplicitBug>::{closure#0}, !>
  10:     0x7faaf48feefe - std[56fe22ad9ea837fd]::panicking::begin_panic::<rustc_errors[43c84716ac990581]::ExplicitBug>
  11:     0x7faaf4915e71 - <rustc_errors[43c84716ac990581]::diagnostic::BugAbort as rustc_errors[43c84716ac990581]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7faaf4f8f2c3 - rustc_middle[f0eb6ba890d0a9bb]::util::bug::opt_span_bug_fmt::<rustc_span[db86d96c2ae2e3a4]::span_encoding::Span>::{closure#0}
  13:     0x7faaf4f758ba - rustc_middle[f0eb6ba890d0a9bb]::ty::context::tls::with_opt::<rustc_middle[f0eb6ba890d0a9bb]::util::bug::opt_span_bug_fmt<rustc_span[db86d96c2ae2e3a4]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7faaf4f7574b - rustc_middle[f0eb6ba890d0a9bb]::ty::context::tls::with_context_opt::<rustc_middle[f0eb6ba890d0a9bb]::ty::context::tls::with_opt<rustc_middle[f0eb6ba890d0a9bb]::util::bug::opt_span_bug_fmt<rustc_span[db86d96c2ae2e3a4]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7faaf31e7300 - rustc_middle[f0eb6ba890d0a9bb]::util::bug::bug_fmt
  16:     0x7faaf75c2ce0 - <rustc_borrowck[de200e79d11a1023]::universal_regions::UniversalRegionIndices>::to_region_vid.cold
  17:     0x7faaf6055b14 - <rustc_borrowck[de200e79d11a1023]::universal_regions::UniversalRegionIndices>::fold_to_region_vids::<rustc_type_ir[8408d34320f8a6fb]::binder::Binder<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt, rustc_type_ir[8408d34320f8a6fb]::ty_kind::FnSig<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt>>>::{closure#0}
  18:     0x7faaf6051924 - <&rustc_middle[f0eb6ba890d0a9bb]::ty::list::RawList<(), rustc_middle[f0eb6ba890d0a9bb]::ty::generic_args::GenericArg> as rustc_type_ir[8408d34320f8a6fb]::fold::TypeFoldable<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[f0eb6ba890d0a9bb]::ty::fold::RegionFolder>
  19:     0x7faaf60527e4 - <rustc_middle[f0eb6ba890d0a9bb]::ty::Ty as rustc_type_ir[8408d34320f8a6fb]::fold::TypeSuperFoldable<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt>>::try_super_fold_with::<rustc_middle[f0eb6ba890d0a9bb]::ty::fold::RegionFolder>
  20:     0x7faaf6051da7 - <&rustc_middle[f0eb6ba890d0a9bb]::ty::list::RawList<(), rustc_middle[f0eb6ba890d0a9bb]::ty::Ty> as rustc_type_ir[8408d34320f8a6fb]::fold::TypeFoldable<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[f0eb6ba890d0a9bb]::ty::fold::RegionFolder>
  21:     0x7faaf70b3648 - rustc_borrowck[de200e79d11a1023]::do_mir_borrowck
  22:     0x7faaf70b228a - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>
  23:     0x7faaf6723681 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::VecCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  24:     0x7faaf672318d - rustc_query_impl[1357963d8dd30e8b]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  25:     0x7faaf69cc8f3 - rustc_middle[f0eb6ba890d0a9bb]::query::plumbing::query_get_at::<rustc_query_system[887bb79932b1d8c1]::query::caches::VecCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>>
  26:     0x7faaf713b05e - rustc_hir_analysis[af6e6fecb0b5810e]::collect::type_of::type_of_opaque
  27:     0x7faaf713aed1 - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>
  28:     0x7faaf6023bb6 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::DefIdCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  29:     0x7faaf72137f5 - rustc_query_impl[1357963d8dd30e8b]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  30:     0x7faaf64f6540 - rustc_middle[f0eb6ba890d0a9bb]::query::plumbing::query_get_at::<rustc_query_system[887bb79932b1d8c1]::query::caches::DefIdCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>>
  31:     0x7faaf318f449 - rustc_hir_analysis[af6e6fecb0b5810e]::collect::type_of::type_of
  32:     0x7faaf6024ef2 - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>
  33:     0x7faaf6023bb6 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::DefIdCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  34:     0x7faaf6023767 - rustc_query_impl[1357963d8dd30e8b]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  35:     0x7faaf64f6540 - rustc_middle[f0eb6ba890d0a9bb]::query::plumbing::query_get_at::<rustc_query_system[887bb79932b1d8c1]::query::caches::DefIdCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>>
  36:     0x7faaf7149109 - rustc_hir_analysis[af6e6fecb0b5810e]::check::check::check_item_type
  37:     0x7faaf3885a93 - rustc_hir_analysis[af6e6fecb0b5810e]::check::wfcheck::check_well_formed
  38:     0x7faaf63ef1c7 - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>
  39:     0x7faaf63ee919 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::VecCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  40:     0x7faaf63ee590 - rustc_query_impl[1357963d8dd30e8b]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  41:     0x7faaf63ef247 - rustc_middle[f0eb6ba890d0a9bb]::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system[887bb79932b1d8c1]::query::caches::VecCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>, ()>
  42:     0x7faaf63ef7f2 - rustc_hir_analysis[af6e6fecb0b5810e]::check::wfcheck::check_mod_type_wf
  43:     0x7faaf63ef26f - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>
  44:     0x7faaf6bed0c1 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::DefaultCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalModDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  45:     0x7faaf6bece70 - rustc_query_impl[1357963d8dd30e8b]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  46:     0x7faaf671f42f - rustc_hir_analysis[af6e6fecb0b5810e]::check_crate
  47:     0x7faaf6868aca - rustc_interface[5fea8bf9cd0b71b5]::passes::run_required_analyses
  48:     0x7faaf6e0861e - rustc_interface[5fea8bf9cd0b71b5]::passes::analysis
  49:     0x7faaf6e085ef - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>
  50:     0x7faaf6f92cee - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::SingleCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  51:     0x7faaf6f929ce - rustc_query_impl[1357963d8dd30e8b]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  52:     0x7faaf6e8707a - rustc_interface[5fea8bf9cd0b71b5]::interface::run_compiler::<core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>, rustc_driver_impl[945e9afaf49c7d35]::run_compiler::{closure#0}>::{closure#1}
  53:     0x7faaf6ecd5d0 - std[56fe22ad9ea837fd]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[5fea8bf9cd0b71b5]::util::run_in_thread_with_globals<rustc_interface[5fea8bf9cd0b71b5]::util::run_in_thread_pool_with_globals<rustc_interface[5fea8bf9cd0b71b5]::interface::run_compiler<core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>, rustc_driver_impl[945e9afaf49c7d35]::run_compiler::{closure#0}>::{closure#1}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#0}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>
  54:     0x7faaf6ecd9eb - <<std[56fe22ad9ea837fd]::thread::Builder>::spawn_unchecked_<rustc_interface[5fea8bf9cd0b71b5]::util::run_in_thread_with_globals<rustc_interface[5fea8bf9cd0b71b5]::util::run_in_thread_pool_with_globals<rustc_interface[5fea8bf9cd0b71b5]::interface::run_compiler<core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>, rustc_driver_impl[945e9afaf49c7d35]::run_compiler::{closure#0}>::{closure#1}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#0}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#1} as core[5ba82ee3405aa490]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  55:     0x7faaf6ece4b9 - std::sys::pal::unix::thread::Thread::new::thread_start::hb3d6392adeea417c
  56:     0x7faaf106bac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  57:     0x7faaf10fd850 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  58:                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: compiler flags: --crate-type staticlib -C link-dead-code -C debuginfo=2 -C opt-level=3 -Z mir-opt-level=3

query stack during panic:
#0 [mir_borrowck] borrow-checking `<impl at mutant.rs:11:1: 11:43>::pass2`
#1 [type_of_opaque] computing type of opaque `<impl at mutant.rs:11:1: 11:43>::pass2::{opaque#0}`
end of query stack
error: aborting due to 7 previous errors

Some errors have detailed explanations: E0046, E0407, E0496, E0670.
For more information about an error, try `rustc --explain E0046`.
Backtrace

stack backtrace:
   0:     0x7faaf585517a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hfadad24fb33e3d1a
   1:     0x7faaf60040a6 - core::fmt::write::h42d25fbda60cd99f
   2:     0x7faaf73c3351 - std::io::Write::write_fmt::hc2819193e80b365e
   3:     0x7faaf5854fd2 - std::sys::backtrace::BacktraceLock::print::h9450230402d77664
   4:     0x7faaf58574d6 - std::panicking::default_hook::{{closure}}::h739047d4d787c596
   5:     0x7faaf5857320 - std::panicking::default_hook::h203d1229480f37a5
   6:     0x7faaf48d2269 - std[56fe22ad9ea837fd]::panicking::update_hook::<alloc[b5641001d343df5f]::boxed::Box<rustc_driver_impl[945e9afaf49c7d35]::install_ice_hook::{closure#0}>>::{closure#0}
   7:     0x7faaf5857be8 - std::panicking::rust_panic_with_hook::h657fdcc17f7e2546
   8:     0x7faaf490c191 - std[56fe22ad9ea837fd]::panicking::begin_panic::<rustc_errors[43c84716ac990581]::ExplicitBug>::{closure#0}
   9:     0x7faaf48ff166 - std[56fe22ad9ea837fd]::sys::backtrace::__rust_end_short_backtrace::<std[56fe22ad9ea837fd]::panicking::begin_panic<rustc_errors[43c84716ac990581]::ExplicitBug>::{closure#0}, !>
  10:     0x7faaf48feefe - std[56fe22ad9ea837fd]::panicking::begin_panic::<rustc_errors[43c84716ac990581]::ExplicitBug>
  11:     0x7faaf4915e71 - <rustc_errors[43c84716ac990581]::diagnostic::BugAbort as rustc_errors[43c84716ac990581]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7faaf4f8f2c3 - rustc_middle[f0eb6ba890d0a9bb]::util::bug::opt_span_bug_fmt::<rustc_span[db86d96c2ae2e3a4]::span_encoding::Span>::{closure#0}
  13:     0x7faaf4f758ba - rustc_middle[f0eb6ba890d0a9bb]::ty::context::tls::with_opt::<rustc_middle[f0eb6ba890d0a9bb]::util::bug::opt_span_bug_fmt<rustc_span[db86d96c2ae2e3a4]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7faaf4f7574b - rustc_middle[f0eb6ba890d0a9bb]::ty::context::tls::with_context_opt::<rustc_middle[f0eb6ba890d0a9bb]::ty::context::tls::with_opt<rustc_middle[f0eb6ba890d0a9bb]::util::bug::opt_span_bug_fmt<rustc_span[db86d96c2ae2e3a4]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7faaf31e7300 - rustc_middle[f0eb6ba890d0a9bb]::util::bug::bug_fmt
  16:     0x7faaf75c2ce0 - <rustc_borrowck[de200e79d11a1023]::universal_regions::UniversalRegionIndices>::to_region_vid.cold
  17:     0x7faaf6055b14 - <rustc_borrowck[de200e79d11a1023]::universal_regions::UniversalRegionIndices>::fold_to_region_vids::<rustc_type_ir[8408d34320f8a6fb]::binder::Binder<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt, rustc_type_ir[8408d34320f8a6fb]::ty_kind::FnSig<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt>>>::{closure#0}
  18:     0x7faaf6051924 - <&rustc_middle[f0eb6ba890d0a9bb]::ty::list::RawList<(), rustc_middle[f0eb6ba890d0a9bb]::ty::generic_args::GenericArg> as rustc_type_ir[8408d34320f8a6fb]::fold::TypeFoldable<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[f0eb6ba890d0a9bb]::ty::fold::RegionFolder>
  19:     0x7faaf60527e4 - <rustc_middle[f0eb6ba890d0a9bb]::ty::Ty as rustc_type_ir[8408d34320f8a6fb]::fold::TypeSuperFoldable<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt>>::try_super_fold_with::<rustc_middle[f0eb6ba890d0a9bb]::ty::fold::RegionFolder>
  20:     0x7faaf6051da7 - <&rustc_middle[f0eb6ba890d0a9bb]::ty::list::RawList<(), rustc_middle[f0eb6ba890d0a9bb]::ty::Ty> as rustc_type_ir[8408d34320f8a6fb]::fold::TypeFoldable<rustc_middle[f0eb6ba890d0a9bb]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[f0eb6ba890d0a9bb]::ty::fold::RegionFolder>
  21:     0x7faaf70b3648 - rustc_borrowck[de200e79d11a1023]::do_mir_borrowck
  22:     0x7faaf70b228a - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>
  23:     0x7faaf6723681 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::VecCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  24:     0x7faaf672318d - rustc_query_impl[1357963d8dd30e8b]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  25:     0x7faaf69cc8f3 - rustc_middle[f0eb6ba890d0a9bb]::query::plumbing::query_get_at::<rustc_query_system[887bb79932b1d8c1]::query::caches::VecCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>>
  26:     0x7faaf713b05e - rustc_hir_analysis[af6e6fecb0b5810e]::collect::type_of::type_of_opaque
  27:     0x7faaf713aed1 - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>
  28:     0x7faaf6023bb6 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::DefIdCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  29:     0x7faaf72137f5 - rustc_query_impl[1357963d8dd30e8b]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  30:     0x7faaf64f6540 - rustc_middle[f0eb6ba890d0a9bb]::query::plumbing::query_get_at::<rustc_query_system[887bb79932b1d8c1]::query::caches::DefIdCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>>
  31:     0x7faaf318f449 - rustc_hir_analysis[af6e6fecb0b5810e]::collect::type_of::type_of
  32:     0x7faaf6024ef2 - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>
  33:     0x7faaf6023bb6 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::DefIdCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  34:     0x7faaf6023767 - rustc_query_impl[1357963d8dd30e8b]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  35:     0x7faaf64f6540 - rustc_middle[f0eb6ba890d0a9bb]::query::plumbing::query_get_at::<rustc_query_system[887bb79932b1d8c1]::query::caches::DefIdCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 8usize]>>>
  36:     0x7faaf7149109 - rustc_hir_analysis[af6e6fecb0b5810e]::check::check::check_item_type
  37:     0x7faaf3885a93 - rustc_hir_analysis[af6e6fecb0b5810e]::check::wfcheck::check_well_formed
  38:     0x7faaf63ef1c7 - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>
  39:     0x7faaf63ee919 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::VecCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  40:     0x7faaf63ee590 - rustc_query_impl[1357963d8dd30e8b]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  41:     0x7faaf63ef247 - rustc_middle[f0eb6ba890d0a9bb]::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system[887bb79932b1d8c1]::query::caches::VecCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>, ()>
  42:     0x7faaf63ef7f2 - rustc_hir_analysis[af6e6fecb0b5810e]::check::wfcheck::check_mod_type_wf
  43:     0x7faaf63ef26f - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>
  44:     0x7faaf6bed0c1 - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::DefaultCache<rustc_span[db86d96c2ae2e3a4]::def_id::LocalModDefId, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  45:     0x7faaf6bece70 - rustc_query_impl[1357963d8dd30e8b]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  46:     0x7faaf671f42f - rustc_hir_analysis[af6e6fecb0b5810e]::check_crate
  47:     0x7faaf6868aca - rustc_interface[5fea8bf9cd0b71b5]::passes::run_required_analyses
  48:     0x7faaf6e0861e - rustc_interface[5fea8bf9cd0b71b5]::passes::analysis
  49:     0x7faaf6e085ef - rustc_query_impl[1357963d8dd30e8b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1357963d8dd30e8b]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>
  50:     0x7faaf6f92cee - rustc_query_system[887bb79932b1d8c1]::query::plumbing::try_execute_query::<rustc_query_impl[1357963d8dd30e8b]::DynamicConfig<rustc_query_system[887bb79932b1d8c1]::query::caches::SingleCache<rustc_middle[f0eb6ba890d0a9bb]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1357963d8dd30e8b]::plumbing::QueryCtxt, false>
  51:     0x7faaf6f929ce - rustc_query_impl[1357963d8dd30e8b]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  52:     0x7faaf6e8707a - rustc_interface[5fea8bf9cd0b71b5]::interface::run_compiler::<core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>, rustc_driver_impl[945e9afaf49c7d35]::run_compiler::{closure#0}>::{closure#1}
  53:     0x7faaf6ecd5d0 - std[56fe22ad9ea837fd]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[5fea8bf9cd0b71b5]::util::run_in_thread_with_globals<rustc_interface[5fea8bf9cd0b71b5]::util::run_in_thread_pool_with_globals<rustc_interface[5fea8bf9cd0b71b5]::interface::run_compiler<core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>, rustc_driver_impl[945e9afaf49c7d35]::run_compiler::{closure#0}>::{closure#1}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#0}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>
  54:     0x7faaf6ecd9eb - <<std[56fe22ad9ea837fd]::thread::Builder>::spawn_unchecked_<rustc_interface[5fea8bf9cd0b71b5]::util::run_in_thread_with_globals<rustc_interface[5fea8bf9cd0b71b5]::util::run_in_thread_pool_with_globals<rustc_interface[5fea8bf9cd0b71b5]::interface::run_compiler<core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>, rustc_driver_impl[945e9afaf49c7d35]::run_compiler::{closure#0}>::{closure#1}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#0}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5ba82ee3405aa490]::result::Result<(), rustc_span[db86d96c2ae2e3a4]::ErrorGuaranteed>>::{closure#1} as core[5ba82ee3405aa490]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  55:     0x7faaf6ece4b9 - std::sys::pal::unix::thread::Thread::new::thread_start::hb3d6392adeea417c
  56:     0x7faaf106bac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  57:     0x7faaf10fd850 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  58:                0x0 - <unknown>

@wxie7 wxie7 added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 8, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 8, 2024
@cyrgani
Copy link
Contributor

cyrgani commented Nov 8, 2024

Reduced:

trait Trait {}
impl<'a> Trait for () {
    fn pass2<'a>() -> impl Trait2 {}
}

trait Trait2 {}
impl Trait2 for () {}

@matthiaskrgr
Copy link
Member

@compiler-errors
Copy link
Member

This looks like a modified version of tests/ui/inference/ice-ifer-var-leaked-out-of-rollback-122098.rs. It would be nice to indicate that you minimized it from an existing test in the future.

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 8, 2024
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Dec 13, 2024
@bors bors closed this as completed in 92dbfcc Jan 2, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
Rollup merge of rust-lang#135000 - compiler-errors:opaque-captures-dupe, r=lqd

Fix ICE when opaque captures a duplicated/invalid lifetime

See description on test.

Fixes rust-lang#132766
Fixes rust-lang#133693
Fixes rust-lang#134780
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants