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: compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs: unexpected path #97698

Closed
matthiaskrgr opened this issue Jun 3, 2022 · 5 comments · Fixed by #97703
Closed
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

kinda garbish-y but it reproduces the ICE 🤷

use std::path::Path;

pub use self::imp::Lock;

#[cfg(unix)]
mod imp {
    use std::ffi::{CString, OsStr};
    use std::os::unix::prelude::*;
    use std::path::Path;
    use std::io;
    use libc;

  

    #[derive(Debug)]
    pub struct Lock {
        fd: libc::c_int,
    }

    impl Lock {
        pub fn new(p: &Path,
                   wait: bool,
                   create: bool,
                   exclusive: bool)
                   -> io::Result<Lock> {
            let os: &OsStr = p.as_ref();
            let buf = CString::new(os.as_bytes()).unwrap();
            let open_flags = if create {
                libc::O_RDWR | libc::O_CREAT
            } else {
                libc::O_RDWR
            };

            let fd = unsafe {
                libc::open(buf.as_ptr(), open_flags,
                           libc::S_IRWXU as libc::c_int)
            };

            let cmd = if wait { os::F_SETLKW } else { os::F_SETLK };
            let ret = unsafe {
                
            };
            if ret == -1 {
                let err = io::Error::last_os_error();
                unsafe { libc::close(fd); }
                Err(err)
            } else {
                Ok(Lock { fd: fd })
            }

        }
    }

}

Meta

rustc --version --verbose:

IMPORTANT: this reproduces with MASTER but not yet with NIGHTLY rustc 1.63.0-nightly (e71440575 2022-06-02)

rustc 1.63.0-nightly (e40d5e83d 2022-06-03)
binary: rustc
commit-hash: e40d5e83dc133d093c22c7ff016b10daa4f40dcf
commit-date: 2022-06-03
host: x86_64-unknown-linux-gnu
release: 1.63.0-nightly
LLVM version: 14.0.4

Error output

error[E0432]: unresolved import `libc`
  --> ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:11:9
   |
11 |     use libc;
   |         ^^^^ no `libc` in the root

error[E0433]: failed to resolve: use of undeclared crate or module `os`
  --> ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:39:33
   |
39 |             let cmd = if wait { os::F_SETLKW } else { os::F_SETLK };
   |                                 ^^ use of undeclared crate or module `os`

error[E0433]: failed to resolve: use of undeclared crate or module `os`
  --> ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:39:55
   |
39 |             let cmd = if wait { os::F_SETLKW } else { os::F_SETLK };
   |                                                       ^^ use of undeclared crate or module `os`

warning: unused import: `std::path::Path`
 --> ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:1:5
  |
1 | use std::path::Path;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0601]: `main` function not found in crate `510c9ceef0960a8c8b6a20e3625ee6c2e10b4052`
  --> ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:54:2
   |
54 | }
   |  ^ consider adding a `main` function to `./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs`

error[E0308]: mismatched types
  --> ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:43:23
   |
43 |             if ret == -1 {
   |                       ^^ expected `()`, found integer

error: internal compiler error: compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs:856:33: unexpected path: def=alloc::ffi::c_str::CString substs=[] path=Path { span: ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:27:23: 27:30 (#0), res: Def(TyAlias, DefId(1:2774 ~ std[4f4f]::ffi::CString)), segments: [PathSegment { ident: CString#0, hir_id: Some(HirId { owner: DefId(0:28 ~ 510c9ceef0960a8c8b6a20e3625ee6c2e10b4052[d1fc]::imp::{impl#0}::new), local_id: 22 }), res: Some(Err), args: None, infer_args: true }] }

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/compiler/rustc_errors/src/lib.rs:1335:9
Backtrace

error: internal compiler error: compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs:856:33: unexpected path: def=alloc::ffi::c_str::CString substs=[] path=Path { span: ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:27:23: 27:30 (#0), res: Def(TyAlias, DefId(1:2774 ~ std[4f4f]::ffi::CString)), segments: [PathSegment { ident: CString#0, hir_id: Some(HirId { owner: DefId(0:28 ~ 510c9ceef0960a8c8b6a20e3625ee6c2e10b4052[d1fc]::imp::{impl#0}::new), local_id: 22 }), res: Some(Err), args: None, infer_args: true }] }

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/compiler/rustc_errors/src/lib.rs:1335:9
stack backtrace:
   0:     0x7f6b6ec9decd - std::backtrace_rs::backtrace::libunwind::trace::hfcd45b45ae488cd5
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f6b6ec9decd - std::backtrace_rs::backtrace::trace_unsynchronized::h405dac851f6cc6a8
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f6b6ec9decd - std::sys_common::backtrace::_print_fmt::h5f6c74a63449dd3f
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f6b6ec9decd - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7d487462c277bf24
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f6b6ecf9bac - core::fmt::write::h832d0c8909aada18
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/core/src/fmt/mod.rs:1196:17
   5:     0x7f6b6ec8f5c1 - std::io::Write::write_fmt::h65c8c1822edc4894
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/io/mod.rs:1654:15
   6:     0x7f6b6eca0bb5 - std::sys_common::backtrace::_print::h560a0f4f262236c1
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f6b6eca0bb5 - std::sys_common::backtrace::print::h0080326ddadae76c
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f6b6eca0bb5 - std::panicking::default_hook::{{closure}}::hc726d21ea0224885
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/panicking.rs:295:22
   9:     0x7f6b6eca08d6 - std::panicking::default_hook::hdcc52b852804bb0b
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/panicking.rs:314:9
  10:     0x7f6b6f4f9f11 - rustc_driver[c7c8f2fedff45b54]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f6b6eca128a - std::panicking::rust_panic_with_hook::h48930cf2efbb5ae2
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/panicking.rs:702:17
  12:     0x7f6b705e7ae1 - std[4f4f1627d3880017]::panicking::begin_panic::<rustc_errors[65331a6f7e432222]::ExplicitBug>::{closure#0}
  13:     0x7f6b705e7556 - std[4f4f1627d3880017]::sys_common::backtrace::__rust_end_short_backtrace::<std[4f4f1627d3880017]::panicking::begin_panic<rustc_errors[65331a6f7e432222]::ExplicitBug>::{closure#0}, !>
  14:     0x7f6b7054ecf6 - std[4f4f1627d3880017]::panicking::begin_panic::<rustc_errors[65331a6f7e432222]::ExplicitBug>
  15:     0x7f6b70572b26 - std[4f4f1627d3880017]::panic::panic_any::<rustc_errors[65331a6f7e432222]::ExplicitBug>
  16:     0x7f6b705722e5 - <rustc_errors[65331a6f7e432222]::HandlerInner>::bug::<&alloc[31c74b9f3315cbc6]::string::String>
  17:     0x7f6b70571dc0 - <rustc_errors[65331a6f7e432222]::Handler>::bug::<&alloc[31c74b9f3315cbc6]::string::String>
  18:     0x7f6b705e4acd - rustc_middle[83233ac63f698a09]::ty::context::tls::with_opt::<rustc_middle[83233ac63f698a09]::util::bug::opt_span_bug_fmt<rustc_span[b73b5b7a1d5e4b08]::span_encoding::Span>::{closure#0}, ()>
  19:     0x7f6b705e4bc6 - rustc_middle[83233ac63f698a09]::util::bug::opt_span_bug_fmt::<rustc_span[b73b5b7a1d5e4b08]::span_encoding::Span>
  20:     0x7f6b705e4b43 - rustc_middle[83233ac63f698a09]::util::bug::bug_fmt
  21:     0x7f6b704a82ba - <rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor>::path_inferred_subst_iter
  22:     0x7f6b704a8833 - <rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a9ca4d4e6c54b339]::intravisit::Visitor>::visit_expr
  23:     0x7f6b704a86cc - <rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a9ca4d4e6c54b339]::intravisit::Visitor>::visit_expr
  24:     0x7f6b704beb92 - rustc_hir[a9ca4d4e6c54b339]::intravisit::walk_expr::<rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  25:     0x7f6b704a86de - <rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a9ca4d4e6c54b339]::intravisit::Visitor>::visit_expr
  26:     0x7f6b704bb80c - rustc_hir[a9ca4d4e6c54b339]::intravisit::walk_local::<rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  27:     0x7f6b704a8348 - <rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a9ca4d4e6c54b339]::intravisit::Visitor>::visit_local
  28:     0x7f6b704bb657 - rustc_hir[a9ca4d4e6c54b339]::intravisit::walk_block::<rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  29:     0x7f6b704a86de - <rustc_infer[78bfaa2976d36a75]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a9ca4d4e6c54b339]::intravisit::Visitor>::visit_expr
  30:     0x7f6b70460f84 - <rustc_infer[78bfaa2976d36a75]::infer::InferCtxt>::emit_inference_failure_err
  31:     0x7f6b703b30c2 - <rustc_infer[78bfaa2976d36a75]::infer::InferCtxt as rustc_trait_selection[ae7a9636b275321f]::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
  32:     0x7f6b703a6c87 - <rustc_infer[78bfaa2976d36a75]::infer::InferCtxt as rustc_trait_selection[ae7a9636b275321f]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  33:     0x7f6b70af7af3 - <rustc_infer[78bfaa2976d36a75]::infer::InferCtxtBuilder>::enter::<&rustc_middle[83233ac63f698a09]::ty::context::TypeckResults, <rustc_typeck[412d93c49a5cfb7d]::check::inherited::InheritedBuilder>::enter<rustc_typeck[412d93c49a5cfb7d]::check::typeck_with_fallback<rustc_typeck[412d93c49a5cfb7d]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[83233ac63f698a09]::ty::context::TypeckResults>::{closure#0}>
  34:     0x7f6b70aa6efa - rustc_typeck[412d93c49a5cfb7d]::check::typeck
  35:     0x7f6b7109bbb4 - rustc_query_system[cd54684135f7aede]::query::plumbing::try_execute_query::<rustc_query_impl[5d43592eeec5f58a]::plumbing::QueryCtxt, rustc_query_system[cd54684135f7aede]::query::caches::DefaultCache<rustc_span[b73b5b7a1d5e4b08]::def_id::LocalDefId, &rustc_middle[83233ac63f698a09]::ty::context::TypeckResults>>
  36:     0x7f6b7107623e - <rustc_query_impl[5d43592eeec5f58a]::Queries as rustc_middle[83233ac63f698a09]::ty::query::QueryEngine>::typeck
  37:     0x7f6b70b55ee8 - <rustc_middle[83233ac63f698a09]::hir::map::Map>::par_body_owners::<rustc_typeck[412d93c49a5cfb7d]::check::typeck_item_bodies::{closure#0}>
  38:     0x7f6b71936a7c - rustc_typeck[412d93c49a5cfb7d]::check::typeck_item_bodies
  39:     0x7f6b71c303ac - rustc_query_system[cd54684135f7aede]::query::plumbing::try_execute_query::<rustc_query_impl[5d43592eeec5f58a]::plumbing::QueryCtxt, rustc_query_system[cd54684135f7aede]::query::caches::DefaultCache<(), ()>>
  40:     0x7f6b71c5a8b1 - rustc_query_system[cd54684135f7aede]::query::plumbing::get_query::<rustc_query_impl[5d43592eeec5f58a]::queries::typeck_item_bodies, rustc_query_impl[5d43592eeec5f58a]::plumbing::QueryCtxt>
  41:     0x7f6b7196d3f3 - <rustc_session[3dcad23083b71834]::session::Session>::time::<(), rustc_typeck[412d93c49a5cfb7d]::check_crate::{closure#7}>
  42:     0x7f6b7194a77b - rustc_typeck[412d93c49a5cfb7d]::check_crate
  43:     0x7f6b716e3a57 - rustc_interface[d21641337a9fbe3]::passes::analysis
  44:     0x7f6b71c2649f - rustc_query_system[cd54684135f7aede]::query::plumbing::try_execute_query::<rustc_query_impl[5d43592eeec5f58a]::plumbing::QueryCtxt, rustc_query_system[cd54684135f7aede]::query::caches::DefaultCache<(), core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>>>
  45:     0x7f6b71c6ce2e - rustc_query_system[cd54684135f7aede]::query::plumbing::get_query::<rustc_query_impl[5d43592eeec5f58a]::queries::analysis, rustc_query_impl[5d43592eeec5f58a]::plumbing::QueryCtxt>
  46:     0x7f6b716c6a07 - <rustc_interface[d21641337a9fbe3]::passes::QueryContext>::enter::<rustc_driver[c7c8f2fedff45b54]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>>
  47:     0x7f6b716b0cc8 - <rustc_interface[d21641337a9fbe3]::interface::Compiler>::enter::<rustc_driver[c7c8f2fedff45b54]::run_compiler::{closure#1}::{closure#2}, core[e20aa153a98323b0]::result::Result<core[e20aa153a98323b0]::option::Option<rustc_interface[d21641337a9fbe3]::queries::Linker>, rustc_errors[65331a6f7e432222]::ErrorGuaranteed>>
  48:     0x7f6b716d44df - rustc_span[b73b5b7a1d5e4b08]::with_source_map::<core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>, rustc_interface[d21641337a9fbe3]::interface::create_compiler_and_run<core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>, rustc_driver[c7c8f2fedff45b54]::run_compiler::{closure#1}>::{closure#1}>
  49:     0x7f6b716b18f2 - <scoped_tls[f8b3eb90e665007e]::ScopedKey<rustc_span[b73b5b7a1d5e4b08]::SessionGlobals>>::set::<rustc_interface[d21641337a9fbe3]::interface::run_compiler<core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>, rustc_driver[c7c8f2fedff45b54]::run_compiler::{closure#1}>::{closure#0}, core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>>
  50:     0x7f6b716c708f - std[4f4f1627d3880017]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[d21641337a9fbe3]::util::run_in_thread_pool_with_globals<rustc_interface[d21641337a9fbe3]::interface::run_compiler<core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>, rustc_driver[c7c8f2fedff45b54]::run_compiler::{closure#1}>::{closure#0}, core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>>::{closure#0}, core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>>
  51:     0x7f6b716c71c9 - <<std[4f4f1627d3880017]::thread::Builder>::spawn_unchecked_<rustc_interface[d21641337a9fbe3]::util::run_in_thread_pool_with_globals<rustc_interface[d21641337a9fbe3]::interface::run_compiler<core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>, rustc_driver[c7c8f2fedff45b54]::run_compiler::{closure#1}>::{closure#0}, core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>>::{closure#0}, core[e20aa153a98323b0]::result::Result<(), rustc_errors[65331a6f7e432222]::ErrorGuaranteed>>::{closure#1} as core[e20aa153a98323b0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  52:     0x7f6b6ecab1b3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3752e20e7af2922b
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/alloc/src/boxed.rs:1951:9
  53:     0x7f6b6ecab1b3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hea44272e5391750e
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/alloc/src/boxed.rs:1951:9
  54:     0x7f6b6ecab1b3 - std::sys::unix::thread::Thread::new::thread_start::h6d31b3f92a2b25ea
                               at /rustc/e40d5e83dc133d093c22c7ff016b10daa4f40dcf/library/std/src/sys/unix/thread.rs:108:17
  55:     0x7f6b6ea835c2 - start_thread
  56:     0x7f6b6eb08584 - __clone
  57:                0x0 - <unknown>

note: 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.63.0-nightly (e40d5e83d 2022-06-03) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `imp::<impl at ./510c9ceef0960a8c8b6a20e3625ee6c2e10b4052.rs:20:5: 52:6>::new`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 6 previous errors; 1 warning emitted

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

@matthiaskrgr matthiaskrgr added 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. C-bug Category: This is a bug. labels Jun 3, 2022
@matthiaskrgr
Copy link
Member Author

the assert was added in #89862 which just merged, cc @lcnr

@matthiaskrgr
Copy link
Member Author

matthiaskrgr commented Jun 3, 2022

reduced a bit further

use std::ffi::CString;

impl Lock {
    pub fn new() {
        if () == -1 {
            CString::new();
        }
    }
}

@dtolnay
Copy link
Member

dtolnay commented Jun 4, 2022

Regression in nightly-2022-06-04. Bisects to #89862.

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

@rustbot rustbot added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jun 4, 2022
dtolnay added a commit to dtolnay/cxx that referenced this issue Jun 4, 2022
This test is affected by an ICE in nightly-2022-06-04.
rust-lang/rust#97698

Minimized repro:

    trait Ambiguous<A> {
        fn method() {}
    }

    struct One;
    struct Two;
    struct Struct;

    impl Ambiguous<One> for Struct {}
    impl Ambiguous<Two> for Struct {}

    fn main() {
        <Struct as Ambiguous<_>>::method();
    }

Correct error in nightly-2022-06-03:

    error[E0282]: type annotations needed
      --> src/main.rs:13:26
       |
    13 |     <Struct as Ambiguous<_>>::method();
       |                          ^ cannot infer type

    error[E0283]: type annotations needed
      --> src/main.rs:13:5
       |
    13 |     <Struct as Ambiguous<_>>::method();
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
       |
    note: multiple `impl`s satisfying `Struct: Ambiguous<_>` found
      --> src/main.rs:9:1
       |
    9  | impl Ambiguous<One> for Struct {}
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    10 | impl Ambiguous<Two> for Struct {}
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ICE in nightly-2022-06-04:

    thread 'rustc' panicked at 'range end index 2 out of range for slice of length 1', library/core/src/slice/index.rs:73:5
    stack backtrace:
      16:     0x7f4cccefd816 - core::slice::index::slice_end_index_len_fail_rt::h04ca4b0b6ddf070e
      17:     0x7f4ccceef707 - core::ops::function::FnOnce::call_once::hb4cbec441e0e0d97
      18:     0x7f4cccef6516 - core::intrinsics::const_eval_select::h2fab5eaa67d7a905
      19:     0x7f4ccce67556 - core::slice::index::slice_end_index_len_fail::ha1557d304be1c61e
      20:     0x7f4cce5ea20f - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
      21:     0x7f4cce5e8edc - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
      22:     0x7f4cce5fbe37 - rustc_hir[5dbb21eaf9590c92]::intravisit::walk_block::<rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
      23:     0x7f4cce5e8eee - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
      24:     0x7f4cce5a1714 - <rustc_infer[9b42245fee805938]::infer::InferCtxt>::emit_inference_failure_err
      25:     0x7f4cce4f32bb - <rustc_infer[9b42245fee805938]::infer::InferCtxt as rustc_trait_selection[af2ed82902f8af73]::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
      26:     0x7f4cce4e6f87 - <rustc_infer[9b42245fee805938]::infer::InferCtxt as rustc_trait_selection[af2ed82902f8af73]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
      27:     0x7f4ccec3fcb4 - <rustc_infer[9b42245fee805938]::infer::InferCtxtBuilder>::enter::<&rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults, <rustc_typeck[4b1a1a7c06e44333]::check::inherited::InheritedBuilder>::enter<rustc_typeck[4b1a1a7c06e44333]::check::typeck_with_fallback<rustc_typeck[4b1a1a7c06e44333]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>::{closure#0}>
      28:     0x7f4ccebd170a - rustc_typeck[4b1a1a7c06e44333]::check::typeck
      29:     0x7f4ccfccf5f0 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, rustc_span[c774ced8c61a5d44]::def_id::LocalDefId, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>
      30:     0x7f4ccf1f8380 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<rustc_span[c774ced8c61a5d44]::def_id::LocalDefId, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>>
      31:     0x7f4ccf123c0e - <rustc_query_impl[f03dd36fb3d62396]::Queries as rustc_middle[c4bb946b42085c78]::ty::query::QueryEngine>::typeck
      32:     0x7f4ccec91708 - <rustc_middle[c4bb946b42085c78]::hir::map::Map>::par_body_owners::<rustc_typeck[4b1a1a7c06e44333]::check::typeck_item_bodies::{closure#0}>
      33:     0x7f4ccfa8e18c - rustc_typeck[4b1a1a7c06e44333]::check::typeck_item_bodies
      34:     0x7f4ccfcee823 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, (), ()>
      35:     0x7f4ccfd991d5 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<(), ()>>
      36:     0x7f4ccfdc3331 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::get_query::<rustc_query_impl[f03dd36fb3d62396]::queries::typeck_item_bodies, rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt>
      37:     0x7f4ccfac4473 - <rustc_session[d1b76e352c1a3b5b]::session::Session>::time::<(), rustc_typeck[4b1a1a7c06e44333]::check_crate::{closure#7}>
      38:     0x7f4ccfab109b - rustc_typeck[4b1a1a7c06e44333]::check_crate
      39:     0x7f4ccf86b017 - rustc_interface[94703aee012e7483]::passes::analysis
      40:     0x7f4ccfcea595 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, (), core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      41:     0x7f4ccfd8f1fd - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<(), core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>>
      42:     0x7f4ccfdd58ee - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::get_query::<rustc_query_impl[f03dd36fb3d62396]::queries::analysis, rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt>
      43:     0x7f4ccf8282a7 - <rustc_interface[94703aee012e7483]::passes::QueryContext>::enter::<rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      44:     0x7f4ccf81234f - <rustc_interface[94703aee012e7483]::interface::Compiler>::enter::<rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}::{closure#2}, core[c8091fc9dea0c6cf]::result::Result<core[c8091fc9dea0c6cf]::option::Option<rustc_interface[94703aee012e7483]::queries::Linker>, rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      45:     0x7f4ccf83bd3f - rustc_span[c774ced8c61a5d44]::with_source_map::<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_interface[94703aee012e7483]::interface::create_compiler_and_run<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#1}>
      46:     0x7f4ccf8131e2 - <scoped_tls[a35f89285f520bf3]::ScopedKey<rustc_span[c774ced8c61a5d44]::SessionGlobals>>::set::<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      47:     0x7f4ccf82893f - std[f19dd7bb03296d5c]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[94703aee012e7483]::util::run_in_thread_pool_with_globals<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      48:     0x7f4ccf828a99 - <<std[f19dd7bb03296d5c]::thread::Builder>::spawn_unchecked_<rustc_interface[94703aee012e7483]::util::run_in_thread_pool_with_globals<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#1} as core[c8091fc9dea0c6cf]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}

    error: internal compiler error: unexpected panic

    note: 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.63.0-nightly (a6b8c6954 2022-06-03) running on x86_64-unknown-linux-gnu

    note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

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

    query stack during panic:
    #0 [typeck] type-checking `main`
    #1 [typeck_item_bodies] type-checking all item bodies
    #2 [analysis] running analysis passes on this crate
    end of query stack
@dtolnay
Copy link
Member

dtolnay commented Jun 4, 2022

I hit a slightly different manifestation of this in the cxx crate. The minimized repro is:

trait Ambiguous<A> {
    fn method() {}
}

struct One;
struct Two;
struct Struct;

impl Ambiguous<One> for Struct {}
impl Ambiguous<Two> for Struct {}

fn main() {
    <Struct as Ambiguous<_>>::method();
}
$ cargo check
thread 'rustc' panicked at 'range end index 2 out of range for slice of length 1', library/core/src/slice/index.rs:73:5

I confirmed that this also bisects to #89862, and is also fixed by #97703, and also occurs in need_type_info::FindInferSourceVisitor, which is why I haven't made a separate issue. But the panic in this case is index out of bounds whereas the original one in this issue involves "unexpected path". @lcnr feel free to grab this test case for #97703 if it's legitimately different from the ones you have already.

Backtrace
thread 'rustc' panicked at 'range end index 2 out of range for slice of length 1', library/core/src/slice/index.rs:73:5
stack backtrace:
   0:     0x7f5bdfb5324d - std::backtrace_rs::backtrace::libunwind::trace::h5ecf6d3c2f2dbed3
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f5bdfb5324d - std::backtrace_rs::backtrace::trace_unsynchronized::h1f34ec78f43478d1
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f5bdfb5324d - std::sys_common::backtrace::_print_fmt::h5eb133ec83ff86d3
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f5bdfb5324d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc8814d47922b5f5b
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f5bdfbaefec - core::fmt::write::h871772ca8ace1475
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/core/src/fmt/mod.rs:1196:17
   5:     0x7f5bdfb449e1 - std::io::Write::write_fmt::he514622e09de3df5
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/io/mod.rs:1654:15
   6:     0x7f5bdfb55f35 - std::sys_common::backtrace::_print::hd629e2d6c07b6e79
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f5bdfb55f35 - std::sys_common::backtrace::print::h6bddafb613b6308d
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f5bdfb55f35 - std::panicking::default_hook::{{closure}}::hf8d6097c4866d273
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/panicking.rs:295:22
   9:     0x7f5bdfb55c56 - std::panicking::default_hook::h44331fd67f31aee4
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/panicking.rs:314:9
  10:     0x7f5be032c6b1 - rustc_driver[7b89ea061d8aedc7]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f5bdfb5660a - std::panicking::rust_panic_with_hook::h51126dbc27bfe5a6
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/panicking.rs:702:17
  12:     0x7f5bdfb56447 - std::panicking::begin_panic_handler::{{closure}}::ha0ed88016ebdcd1e
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/panicking.rs:588:13
  13:     0x7f5bdfb53704 - std::sys_common::backtrace::__rust_end_short_backtrace::h05a84a7ce4d2e529
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7f5bdfb56179 - rust_begin_unwind
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/panicking.rs:584:5
  15:     0x7f5bdfb1b443 - core::panicking::panic_fmt::hc7f457b7c7e09a46
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/core/src/panicking.rs:142:14
  16:     0x7f5bdfbb1816 - core::slice::index::slice_end_index_len_fail_rt::h04ca4b0b6ddf070e
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/core/src/slice/index.rs:73:5
  17:     0x7f5bdfba3707 - core::ops::function::FnOnce::call_once::hb4cbec441e0e0d97
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/core/src/ops/function.rs:248:5
  18:     0x7f5bdfbaa516 - core::intrinsics::const_eval_select::h2fab5eaa67d7a905
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/core/src/intrinsics.rs:2375:5
  19:     0x7f5bdfb1b556 - core::slice::index::slice_end_index_len_fail::ha1557d304be1c61e
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/core/src/slice/index.rs:67:9
  20:     0x7f5be129e20f - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
  21:     0x7f5be129cedc - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
  22:     0x7f5be12afe37 - rustc_hir[5dbb21eaf9590c92]::intravisit::walk_block::<rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  23:     0x7f5be129ceee - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
  24:     0x7f5be1255714 - <rustc_infer[9b42245fee805938]::infer::InferCtxt>::emit_inference_failure_err
  25:     0x7f5be11a72bb - <rustc_infer[9b42245fee805938]::infer::InferCtxt as rustc_trait_selection[af2ed82902f8af73]::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
  26:     0x7f5be119af87 - <rustc_infer[9b42245fee805938]::infer::InferCtxt as rustc_trait_selection[af2ed82902f8af73]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  27:     0x7f5be18f3cb4 - <rustc_infer[9b42245fee805938]::infer::InferCtxtBuilder>::enter::<&rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults, <rustc_typeck[4b1a1a7c06e44333]::check::inherited::InheritedBuilder>::enter<rustc_typeck[4b1a1a7c06e44333]::check::typeck_with_fallback<rustc_typeck[4b1a1a7c06e44333]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>::{closure#0}>
  28:     0x7f5be188570a - rustc_typeck[4b1a1a7c06e44333]::check::typeck
  29:     0x7f5be29835f0 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, rustc_span[c774ced8c61a5d44]::def_id::LocalDefId, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>
  30:     0x7f5be1eac380 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<rustc_span[c774ced8c61a5d44]::def_id::LocalDefId, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>>
  31:     0x7f5be1dd7c0e - <rustc_query_impl[f03dd36fb3d62396]::Queries as rustc_middle[c4bb946b42085c78]::ty::query::QueryEngine>::typeck
  32:     0x7f5be1945708 - <rustc_middle[c4bb946b42085c78]::hir::map::Map>::par_body_owners::<rustc_typeck[4b1a1a7c06e44333]::check::typeck_item_bodies::{closure#0}>
  33:     0x7f5be274218c - rustc_typeck[4b1a1a7c06e44333]::check::typeck_item_bodies
  34:     0x7f5be29a2823 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, (), ()>
  35:     0x7f5be2a4d1d5 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<(), ()>>
  36:     0x7f5be2a77331 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::get_query::<rustc_query_impl[f03dd36fb3d62396]::queries::typeck_item_bodies, rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt>
  37:     0x7f5be2778473 - <rustc_session[d1b76e352c1a3b5b]::session::Session>::time::<(), rustc_typeck[4b1a1a7c06e44333]::check_crate::{closure#7}>
  38:     0x7f5be276509b - rustc_typeck[4b1a1a7c06e44333]::check_crate
  39:     0x7f5be251f017 - rustc_interface[94703aee012e7483]::passes::analysis
  40:     0x7f5be299e595 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, (), core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
  41:     0x7f5be2a431fd - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<(), core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>>
  42:     0x7f5be2a898ee - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::get_query::<rustc_query_impl[f03dd36fb3d62396]::queries::analysis, rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt>
  43:     0x7f5be24dc2a7 - <rustc_interface[94703aee012e7483]::passes::QueryContext>::enter::<rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
  44:     0x7f5be24c634f - <rustc_interface[94703aee012e7483]::interface::Compiler>::enter::<rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}::{closure#2}, core[c8091fc9dea0c6cf]::result::Result<core[c8091fc9dea0c6cf]::option::Option<rustc_interface[94703aee012e7483]::queries::Linker>, rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
  45:     0x7f5be24efd3f - rustc_span[c774ced8c61a5d44]::with_source_map::<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_interface[94703aee012e7483]::interface::create_compiler_and_run<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#1}>
  46:     0x7f5be24c71e2 - <scoped_tls[a35f89285f520bf3]::ScopedKey<rustc_span[c774ced8c61a5d44]::SessionGlobals>>::set::<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
  47:     0x7f5be24dc93f - std[f19dd7bb03296d5c]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[94703aee012e7483]::util::run_in_thread_pool_with_globals<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
  48:     0x7f5be24dca99 - <<std[f19dd7bb03296d5c]::thread::Builder>::spawn_unchecked_<rustc_interface[94703aee012e7483]::util::run_in_thread_pool_with_globals<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#1} as core[c8091fc9dea0c6cf]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  49:     0x7f5bdfb60533 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb3d14b8461bee867
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/alloc/src/boxed.rs:1951:9
  50:     0x7f5bdfb60533 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h528c1f598bc32c8b
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/alloc/src/boxed.rs:1951:9
  51:     0x7f5bdfb60533 - std::sys::unix::thread::Thread::new::thread_start::h9efddab2b9d9a6d4
                               at /rustc/a6b8c6954829669a5c4fa320c3e6132edf04fcfc/library/std/src/sys/unix/thread.rs:108:17
  52:     0x7f5bdfa5d609 - start_thread
                               at /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
  53:     0x7f5bdf980133 - clone
                               at /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  54:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: 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.63.0-nightly (a6b8c6954 2022-06-03) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

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

query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack

@Dylan-DPC
Copy link
Member

Labeling it as p-medium based on the discussion here

@Dylan-DPC Dylan-DPC added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jun 4, 2022
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Jun 4, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Jun 11, 2022
some additional `need_type_info.rs` cleanup

also fixes rust-lang#97698, fixes rust-lang#97806

cc `@estebank`
@bors bors closed this as completed in f8e73ed Jun 11, 2022
jswillard added a commit to jswillard/cxx that referenced this issue Aug 19, 2022
commit 0a7d5cd54871d5700ef07aa59952652c81785981
Author: Russell Greene <russell@shotover.com>
Date:   Thu Jun 23 04:03:15 2022 +0000

    fix accidental removal

commit d418fdb0b1304c9046f0756b2d5b4924a4687476
Author: Russell Greene <russellgreene8@gmail.com>
Date:   Wed Jan 26 12:28:08 2022 -0600

    add test for null ptr

commit 09f0311b1e10b7ee1ce5ccebbddcfb11dd496c57
Author: Russell Greene <russellgreene8@gmail.com>
Date:   Wed Jan 26 12:22:04 2022 -0600

    fix from_unmanaged not being implemented for C++ types, and add corresponding test

commit ba25e4cf3b0640b152cf1e7bf22179086b44e4fd
Author: Russell Greene <russellgreene8@gmail.com>
Date:   Tue Jan 25 15:02:49 2022 -0600

    Check contents of moved string

commit 478fb85c8fdfb0591bdc8efaa969036baa05e20a
Author: Russell Greene <russellgreene8@gmail.com>
Date:   Tue Jan 25 14:56:42 2022 -0600

    Add UniquePtr::to_shared and SharedPtr::from_unmanaged

commit 1862c5dad56c3da71420c5dca6e80ab788bb193d
Author: David Tolnay <dtolnay@gmail.com>
Date:   Wed Jul 6 21:06:51 2022 -0700

    Update ui test suite to nightly-2022-07-07

commit 2e1527c83439d694858944ee20b763b46b73f65f
Author: David Tolnay <dtolnay@gmail.com>
Date:   Wed Jul 6 07:19:36 2022 -0700

    Release 1.0.71

commit 08eef74de39a027d7ae20a68c5325a59bfcfea3e
Author: David Tolnay <dtolnay@gmail.com>
Date:   Wed Jul 6 07:19:10 2022 -0700

    Lockfile update

commit 3cb0d42b3e089aa75682af3190f2213395c9493a
Merge: ac898723 0bbc34bc
Author: David Tolnay <dtolnay@gmail.com>
Date:   Wed Jul 6 07:17:58 2022 -0700

    Merge pull request #1064 from luckyuro/master

    make #derive before #attr when expand to avoid warning legacy_derive_helpers

commit 0bbc34bc251a079071f8cf8ca63a4552e977282a
Author: abbform <abbform@gmail.com>
Date:   Wed Jul 6 21:58:48 2022 +0800

    make #derive before #attr when derive

commit ac898723167a8ee9fe820195df4cf941a7124ffb
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon Jul 4 09:56:31 2022 -0700

    Release 1.0.70

commit 2a165ef375455d5f574664fa9b99481bd92cf84d
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon Jul 4 09:49:07 2022 -0700

    Run quote build script

commit c45bd4428e4e0415f705b7e9fd8b34fae7899796
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon Jul 4 09:46:08 2022 -0700

    Lockfile update

commit cc81e8cf70da8fbe2520041eb1fb7dda1e3c4f02
Merge: d8892fec 30427e02
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon Jul 4 09:43:02 2022 -0700

    Merge pull request #1062 from dtolnay/attrs

    Clippy attrs on extern "Rust" blocks

commit 30427e0205ef459c26b1418fc2850f034b635608
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon Jul 4 09:25:21 2022 -0700

    Propagate attrs from extern mod onto all contents
        mod ffi {
            extern "Rust" {
                fn repro(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32, g: i32, h: i32) -> bool;
            }
        }

    Before:

        warning: this function has too many arguments (8/7)
         --> src/main.rs:5:12
          |
        5 |         fn repro(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32, g: i32, h: i32) -> bool;
          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          |
          = note: `#[warn(clippy::too_many_arguments)]` on by default
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

    After: no lint.

commit 66ba9a0a666bb9cc3181c1bcf08a52729d7a0084
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon Jul 4 09:20:52 2022 -0700

    Preserve clippy attrs on extern "Rust" fn
        mod ffi {
            extern "Rust" {
                fn repro(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32, g: i32, h: i32) -> bool;
            }
        }

    Before:

        warning: this function has too many arguments (8/7)
         --> src/main.rs:5:12
          |
        5 |         fn repro(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32, g: i32, h: i32) -> bool;
          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          |
          = note: `#[warn(clippy::too_many_arguments)]` on by default
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

    After: no lint.

commit d8892fecd32e480b5cc0c91921797b0b18c1555c
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jul 1 20:01:03 2022 -0700

    Ignore explicit_auto_deref clippy lint

        error: deref which would be done by auto-deref
          --> gen/build/src/intern.rs:23:27
           |
        23 |         Some(interned) => *interned,
           |                           ^^^^^^^^^ help: try this: `interned`
           |
           = note: `-D clippy::explicit-auto-deref` implied by `-D clippy::all`
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref

commit 65d50f275f06a3ba6d2139f18c043d8150cfe3fc
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jul 1 19:35:47 2022 -0700

    Update ui test suite to nightly-2022-07-02

commit 98c5161a7de6401b6e079b254bba6f1278e6a956
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jun 24 00:25:50 2022 -0700

    Disable pc-windows-gnu CI for now

    Currently failing in GitHub Actions with:

        Compiling demo v0.0.0 (D:\a\cxx\cxx\demo)
         Finished dev [unoptimized + debuginfo] target(s) in 1m 57s
          Running `target\debug\demo.exe`
        error: process didn't exit successfully: `target\debug\demo.exe` (exit code: 0xc0000139, STATUS_ENTRYPOINT_NOT_FOUND)
        Error: Process completed with exit code 1.

commit 5d50b94280b4266bafb335415464fb744e337f53
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jun 17 23:56:34 2022 -0700

    Release 1.0.69

commit ad0d6ba6debf79ae85d5cde786fc71ddf4ae2035
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jun 17 23:53:02 2022 -0700

    Lockfile update

commit 52dfbe177c44663da8a3ae649af77d9828b3d04a
Merge: f1d7bff5 2a606a3e
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jun 17 23:52:10 2022 -0700

    Merge pull request #1060 from dtolnay/clap

    Update to clap 3.2

commit 2a606a3e4261d35e322b2a9bb35d66bcaba278bd
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jun 17 23:17:44 2022 -0700

    Update to clap 3.2

commit f1d7bff5ba47c7b4dc8b65733ee354574ae9ab25
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jun 17 23:23:08 2022 -0700

    Require explicit edition on all Buck targets

commit 5ceda9a122a567993c28f5dfaae575916d9c8c1d
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri Jun 17 22:31:15 2022 -0700

    Update oldest allowed compiler for cxxbridge-cmd to 1.56.1

commit 287ae044fee934b2c29bce3dab58bafd44b80eb7
Author: David Tolnay <dtolnay@gmail.com>
Date:   Sat Jun 11 10:15:55 2022 -0700

    Use upstreamed docs.rs icon in docs.rs badge

commit 1526d5bad240983c3c1a1a888d29003482a9cd78
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon Jun 6 23:49:47 2022 -0700

    Ignore significant_drop_in_scrutinee clippy lint

        error: temporary with significant drop in match scrutinee
          --> gen/build/src/intern.rs:22:26
           |
        22 |     InternedString(match set.get(s) {
           |                          ^^^^^^^^^^
           |
           = note: `-D clippy::significant-drop-in-scrutinee` implied by `-D clippy::all`
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#significant_drop_in_scrutinee

commit 13998f0482417085433e012f46e0796099c6c774
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon Jun 6 14:39:20 2022 -0700

    Check all crates in workspace for outdated deps

commit fb6db7d11ec57b0f14d3323ed201887f15a16512
Author: David Tolnay <dtolnay@gmail.com>
Date:   Sat Jun 4 00:39:28 2022 -0700

    Delete unpin_impl.rs UI test temporarily

    This test is affected by an ICE in nightly-2022-06-04.
    https://github.com/rust-lang/rust/issues/97698

    Minimized repro:

        trait Ambiguous<A> {
            fn method() {}
        }

        struct One;
        struct Two;
        struct Struct;

        impl Ambiguous<One> for Struct {}
        impl Ambiguous<Two> for Struct {}

        fn main() {
            <Struct as Ambiguous<_>>::method();
        }

    Correct error in nightly-2022-06-03:

        error[E0282]: type annotations needed
          --> src/main.rs:13:26
           |
        13 |     <Struct as Ambiguous<_>>::method();
           |                          ^ cannot infer type

        error[E0283]: type annotations needed
          --> src/main.rs:13:5
           |
        13 |     <Struct as Ambiguous<_>>::method();
           |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
           |
        note: multiple `impl`s satisfying `Struct: Ambiguous<_>` found
          --> src/main.rs:9:1
           |
        9  | impl Ambiguous<One> for Struct {}
           | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        10 | impl Ambiguous<Two> for Struct {}
           | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    ICE in nightly-2022-06-04:

        thread 'rustc' panicked at 'range end index 2 out of range for slice of length 1', library/core/src/slice/index.rs:73:5
        stack backtrace:
          16:     0x7f4cccefd816 - core::slice::index::slice_end_index_len_fail_rt::h04ca4b0b6ddf070e
          17:     0x7f4ccceef707 - core::ops::function::FnOnce::call_once::hb4cbec441e0e0d97
          18:     0x7f4cccef6516 - core::intrinsics::const_eval_select::h2fab5eaa67d7a905
          19:     0x7f4ccce67556 - core::slice::index::slice_end_index_len_fail::ha1557d304be1c61e
          20:     0x7f4cce5ea20f - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
          21:     0x7f4cce5e8edc - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
          22:     0x7f4cce5fbe37 - rustc_hir[5dbb21eaf9590c92]::intravisit::walk_block::<rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
          23:     0x7f4cce5e8eee - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
          24:     0x7f4cce5a1714 - <rustc_infer[9b42245fee805938]::infer::InferCtxt>::emit_inference_failure_err
          25:     0x7f4cce4f32bb - <rustc_infer[9b42245fee805938]::infer::InferCtxt as rustc_trait_selection[af2ed82902f8af73]::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
          26:     0x7f4cce4e6f87 - <rustc_infer[9b42245fee805938]::infer::InferCtxt as rustc_trait_selection[af2ed82902f8af73]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
          27:     0x7f4ccec3fcb4 - <rustc_infer[9b42245fee805938]::infer::InferCtxtBuilder>::enter::<&rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults, <rustc_typeck[4b1a1a7c06e44333]::check::inherited::InheritedBuilder>::enter<rustc_typeck[4b1a1a7c06e44333]::check::typeck_with_fallback<rustc_typeck[4b1a1a7c06e44333]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>::{closure#0}>
          28:     0x7f4ccebd170a - rustc_typeck[4b1a1a7c06e44333]::check::typeck
          29:     0x7f4ccfccf5f0 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, rustc_span[c774ced8c61a5d44]::def_id::LocalDefId, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>
          30:     0x7f4ccf1f8380 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<rustc_span[c774ced8c61a5d44]::def_id::LocalDefId, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>>
          31:     0x7f4ccf123c0e - <rustc_query_impl[f03dd36fb3d62396]::Queries as rustc_middle[c4bb946b42085c78]::ty::query::QueryEngine>::typeck
          32:     0x7f4ccec91708 - <rustc_middle[c4bb946b42085c78]::hir::map::Map>::par_body_owners::<rustc_typeck[4b1a1a7c06e44333]::check::typeck_item_bodies::{closure#0}>
          33:     0x7f4ccfa8e18c - rustc_typeck[4b1a1a7c06e44333]::check::typeck_item_bodies
          34:     0x7f4ccfcee823 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, (), ()>
          35:     0x7f4ccfd991d5 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<(), ()>>
          36:     0x7f4ccfdc3331 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::get_query::<rustc_query_impl[f03dd36fb3d62396]::queries::typeck_item_bodies, rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt>
          37:     0x7f4ccfac4473 - <rustc_session[d1b76e352c1a3b5b]::session::Session>::time::<(), rustc_typeck[4b1a1a7c06e44333]::check_crate::{closure#7}>
          38:     0x7f4ccfab109b - rustc_typeck[4b1a1a7c06e44333]::check_crate
          39:     0x7f4ccf86b017 - rustc_interface[94703aee012e7483]::passes::analysis
          40:     0x7f4ccfcea595 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, (), core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
          41:     0x7f4ccfd8f1fd - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<(), core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>>
          42:     0x7f4ccfdd58ee - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::get_query::<rustc_query_impl[f03dd36fb3d62396]::queries::analysis, rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt>
          43:     0x7f4ccf8282a7 - <rustc_interface[94703aee012e7483]::passes::QueryContext>::enter::<rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
          44:     0x7f4ccf81234f - <rustc_interface[94703aee012e7483]::interface::Compiler>::enter::<rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}::{closure#2}, core[c8091fc9dea0c6cf]::result::Result<core[c8091fc9dea0c6cf]::option::Option<rustc_interface[94703aee012e7483]::queries::Linker>, rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
          45:     0x7f4ccf83bd3f - rustc_span[c774ced8c61a5d44]::with_source_map::<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_interface[94703aee012e7483]::interface::create_compiler_and_run<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#1}>
          46:     0x7f4ccf8131e2 - <scoped_tls[a35f89285f520bf3]::ScopedKey<rustc_span[c774ced8c61a5d44]::SessionGlobals>>::set::<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
          47:     0x7f4ccf82893f - std[f19dd7bb03296d5c]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[94703aee012e7483]::util::run_in_thread_pool_with_globals<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
          48:     0x7f4ccf828a99 - <<std[f19dd7bb03296d5c]::thread::Builder>::spawn_unchecked_<rustc_interface[94703aee012e7483]::util::run_in_thread_pool_with_globals<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#1} as core[c8091fc9dea0c6cf]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}

        error: internal compiler error: unexpected panic

        note: 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.63.0-nightly (a6b8c6954 2022-06-03) running on x86_64-unknown-linux-gnu

        note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

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

        query stack during panic:
        end of query stack

commit 3e7e454d834eaa4ebfa9487f8aac89e246e237db
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon May 23 04:50:16 2022 -0700

    Drop unneeded permissions from workflow

commit b305ae77411c6fe187bd4a8323678cad1764c3ac
Author: David Tolnay <dtolnay@gmail.com>
Date:   Sat May 21 19:58:45 2022 -0700

    Ignore derive_partial_eq_without_eq clippy lint

        error: you are deriving `PartialEq` and can implement `Eq`
         --> gen/lib/src/gen/block.rs:3:23
          |
        3 | #[derive(Copy, Clone, PartialEq, Debug)]
          |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
          |
          = note: `-D clippy::derive-partial-eq-without-eq` implied by `-D clippy::all`
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
         --> gen/cmd/src/gen/block.rs:3:23
          |
        3 | #[derive(Copy, Clone, PartialEq, Debug)]
          |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
          |
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
         --> gen/build/src/gen/block.rs:3:23
          |
        3 | #[derive(Copy, Clone, PartialEq, Debug)]
          |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
          |
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
         --> gen/lib/src/syntax/atom.rs:5:23
          |
        5 | #[derive(Copy, Clone, PartialEq)]
          |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
          |
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
          --> gen/lib/src/syntax/derive.rs:10:23
           |
        10 | #[derive(Copy, Clone, PartialEq)]
           |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
           |
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
         --> gen/cmd/src/syntax/atom.rs:5:23
          |
        5 | #[derive(Copy, Clone, PartialEq)]
          |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
          |
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
         --> gen/build/src/syntax/atom.rs:5:23
          |
        5 | #[derive(Copy, Clone, PartialEq)]
          |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
          |
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
          --> gen/cmd/src/syntax/derive.rs:10:23
           |
        10 | #[derive(Copy, Clone, PartialEq)]
           |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
           |
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
          --> gen/build/src/syntax/derive.rs:10:23
           |
        10 | #[derive(Copy, Clone, PartialEq)]
           |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
           |
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
          --> gen/lib/src/syntax/mod.rs:72:23
           |
        72 | #[derive(Copy, Clone, PartialEq, Debug)]
           |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
           |
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
           --> gen/lib/src/syntax/mod.rs:285:23
            |
        285 | #[derive(Copy, Clone, PartialEq)]
            |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
            |
            = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
          --> gen/cmd/src/syntax/mod.rs:72:23
           |
        72 | #[derive(Copy, Clone, PartialEq, Debug)]
           |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
           |
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
           --> gen/cmd/src/syntax/mod.rs:285:23
            |
        285 | #[derive(Copy, Clone, PartialEq)]
            |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
            |
            = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
          --> gen/build/src/syntax/mod.rs:72:23
           |
        72 | #[derive(Copy, Clone, PartialEq, Debug)]
           |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
           |
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
           --> gen/build/src/syntax/mod.rs:285:23
            |
        285 | #[derive(Copy, Clone, PartialEq)]
            |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
            |
            = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
         --> macro/src/syntax/atom.rs:5:23
          |
        5 | #[derive(Copy, Clone, PartialEq)]
          |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
          |
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
          --> macro/src/syntax/derive.rs:10:23
           |
        10 | #[derive(Copy, Clone, PartialEq)]
           |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
           |
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
          --> macro/src/syntax/mod.rs:72:23
           |
        72 | #[derive(Copy, Clone, PartialEq, Debug)]
           |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
           |
           = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

        error: you are deriving `PartialEq` and can implement `Eq`
           --> macro/src/syntax/mod.rs:285:23
            |
        285 | #[derive(Copy, Clone, PartialEq)]
            |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
            |
            = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

commit 2a197e7688220f3af1957b29b26eae174669efb7
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon May 16 15:42:16 2022 -0700

    Replace unicode-xid with unicode-ident crate

commit aa85818fcc0028b056d92e8c06810facb47c6e64
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon May 16 15:40:31 2022 -0700

    Lockfile update

commit d4920548a7712f74ed5623e4b2694662b756a091
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri May 13 16:45:29 2022 -0700

    Release 1.0.68

commit 7455a976f7adb3a09db2d557489055e541ec3fa9
Author: David Tolnay <dtolnay@gmail.com>
Date:   Fri May 13 16:43:47 2022 -0700

    Lockfile update

commit 13cc5d9df9dd6f2666df51bc90e5cfdfa25e37bf
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon May 9 21:33:38 2022 -0700

    Resolve unused_attributes lints in generated code

        warning: `#[doc(hidden)]` is ignored on trait impl items
          --> tests/ffi/module.rs:74:23
           |
        74 |     impl UniquePtr<D> {}
           |                       ^^ help: remove this attribute
           |
           = note: `#[warn(unused_attributes)]` on by default
           = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
           = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
          --> tests/ffi/module.rs:75:23
           |
        75 |     impl UniquePtr<E> {}
           |                       ^^ help: remove this attribute
           |
           = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
           = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
          --> tests/ffi/module.rs:76:23
           |
        76 |     impl UniquePtr<F> {}
           |                       ^^ help: remove this attribute
           |
           = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
           = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
          --> tests/ffi/module.rs:77:23
           |
        77 |     impl UniquePtr<G> {}
           |                       ^^ help: remove this attribute
           |
           = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
           = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
          --> tests/ffi/module.rs:57:51
           |
        57 |         fn c_return_ns_unique_ptr() -> UniquePtr<H>;
           |                                                   ^ help: remove this attribute
           |
           = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
           = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
          --> tests/ffi/module.rs:71:54
           |
        71 |         fn ns_c_return_unique_ptr_ns() -> UniquePtr<I>;
           |                                                      ^ help: remove this attribute
           |
           = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
           = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> tests/ffi/lib.rs:227:18
            |
        227 |         #[derive(ExternType)]
            |                  ^^^^^^^^^^ help: remove this attribute
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> tests/ffi/lib.rs:337:34
            |
        337 |     impl CxxVector<SharedString> {}
            |                                  ^^ help: remove this attribute
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
          --> tests/ffi/lib.rs:99:48
           |
        99 |         fn c_return_unique_ptr() -> UniquePtr<C>;
           |                                                ^ help: remove this attribute
           |
           = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
           = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> tests/ffi/lib.rs:100:48
            |
        100 |         fn c_return_shared_ptr() -> SharedPtr<C>;
            |                                                ^ help: remove this attribute
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> tests/ffi/lib.rs:112:77
            |
        112 |         fn c_return_unique_ptr_vector_shared() -> UniquePtr<CxxVector<Shared>>;
            |                                                                             ^^ help: remove this attribute
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> tests/ffi/lib.rs:113:72
            |
        113 |         fn c_return_unique_ptr_vector_opaque() -> UniquePtr<CxxVector<C>>;
            |                                                                        ^^ help: remove this attribute
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> tests/ffi/lib.rs:204:44
            |
        204 |         fn c_get_use_count(weak: &WeakPtr<C>) -> usize;
            |                                            ^ help: remove this attribute
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> tests/ffi/lib.rs:234:72
            |
        234 |         fn c_return_borrow<'a>(s: &'a CxxString) -> UniquePtr<Borrow<'a>>;
            |                                                                        ^^ help: remove this attribute
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

commit af2620ca039853d5c7e42dde6ec3bf2fac6cb650
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon May 9 21:29:38 2022 -0700

    Suppress bad unused_attributes lint on doc(hidden) attr

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/extern_type.rs:194:17
            |
        194 |                   #[doc(hidden)]
            |                   ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        202 | / impl_extern_type! {
        203 | |     [Trivial]
        204 | |     bool = "bool"
        205 | |     u8 = "std::uint8_t"
        ...   |
        223 | |     CxxString = "std::string"
        224 | | }
            | |_- in this macro invocation
            |
            = note: `#[warn(unused_attributes)]` on by default
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_extern_type` (in Nightly builds, run with -Z macro-backtrace for more info)

commit 0b878ccec4f58febda71523acf59eb7cc830d819
Author: David Tolnay <dtolnay@gmail.com>
Date:   Mon May 9 21:23:01 2022 -0700

    Remove doc(hidden) attribute that is being phased out

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:400:13
            |
        400 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = note: `#[warn(unused_attributes)]` on by default
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:404:13
            |
        404 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:414:13
            |
        414 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:371:9
            |
        371 |         #[doc(hidden)]
            |         ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `vector_element_by_value_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:381:9
            |
        381 |         #[doc(hidden)]
            |         ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `vector_element_by_value_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:425:13
            |
        425 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:437:13
            |
        437 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:449:13
            |
        449 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:459:13
            |
        459 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:469:13
            |
        469 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        489 | impl_vector_element_for_primitive!(u8);
            | -------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:400:13
            |
        400 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:404:13
            |
        404 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:414:13
            |
        414 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:371:9
            |
        371 |         #[doc(hidden)]
            |         ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `vector_element_by_value_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:381:9
            |
        381 |         #[doc(hidden)]
            |         ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `vector_element_by_value_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:425:13
            |
        425 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:437:13
            |
        437 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:449:13
            |
        449 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:459:13
            |
        459 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:469:13
            |
        469 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        490 | impl_vector_element_for_primitive!(u16);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:400:13
            |
        400 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:404:13
            |
        404 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:414:13
            |
        414 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:371:9
            |
        371 |         #[doc(hidden)]
            |         ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `vector_element_by_value_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:381:9
            |
        381 |         #[doc(hidden)]
            |         ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `vector_element_by_value_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:425:13
            |
        425 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:437:13
            |
        437 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:449:13
            |
        449 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:459:13
            |
        459 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:469:13
            |
        469 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        491 | impl_vector_element_for_primitive!(u32);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:400:13
            |
        400 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        492 | impl_vector_element_for_primitive!(u64);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:404:13
            |
        404 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        492 | impl_vector_element_for_primitive!(u64);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:414:13
            |
        414 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        492 | impl_vector_element_for_primitive!(u64);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:371:9
            |
        371 |         #[doc(hidden)]
            |         ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        492 | impl_vector_element_for_primitive!(u64);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `vector_element_by_value_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:381:9
            |
        381 |         #[doc(hidden)]
            |         ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        492 | impl_vector_element_for_primitive!(u64);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `vector_element_by_value_methods` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:425:13
            |
        425 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        492 | impl_vector_element_for_primitive!(u64);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:437:13
            |
        437 |             #[doc(hidden)]
            |             ^^^^^^^^^^^^^^ help: remove this attribute
        ...
        492 | impl_vector_element_for_primitive!(u64);
            | --------------------------------------- in this macro invocation
            |
            = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
            = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
            = note: this warning originates in the macro `impl_vector_element` (in Nightly builds, run with -Z macro-backtrace for more info)

        warning: `#[doc(hidden)]` is ignored on trait impl items
           --> src/cxx_vector.rs:449:13
       …
russelltg pushed a commit to russelltg/cxx that referenced this issue Jan 21, 2023
This test is affected by an ICE in nightly-2022-06-04.
rust-lang/rust#97698

Minimized repro:

    trait Ambiguous<A> {
        fn method() {}
    }

    struct One;
    struct Two;
    struct Struct;

    impl Ambiguous<One> for Struct {}
    impl Ambiguous<Two> for Struct {}

    fn main() {
        <Struct as Ambiguous<_>>::method();
    }

Correct error in nightly-2022-06-03:

    error[E0282]: type annotations needed
      --> src/main.rs:13:26
       |
    13 |     <Struct as Ambiguous<_>>::method();
       |                          ^ cannot infer type

    error[E0283]: type annotations needed
      --> src/main.rs:13:5
       |
    13 |     <Struct as Ambiguous<_>>::method();
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
       |
    note: multiple `impl`s satisfying `Struct: Ambiguous<_>` found
      --> src/main.rs:9:1
       |
    9  | impl Ambiguous<One> for Struct {}
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    10 | impl Ambiguous<Two> for Struct {}
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ICE in nightly-2022-06-04:

    thread 'rustc' panicked at 'range end index 2 out of range for slice of length 1', library/core/src/slice/index.rs:73:5
    stack backtrace:
      16:     0x7f4cccefd816 - core::slice::index::slice_end_index_len_fail_rt::h04ca4b0b6ddf070e
      17:     0x7f4ccceef707 - core::ops::function::FnOnce::call_once::hb4cbec441e0e0d97
      18:     0x7f4cccef6516 - core::intrinsics::const_eval_select::h2fab5eaa67d7a905
      19:     0x7f4ccce67556 - core::slice::index::slice_end_index_len_fail::ha1557d304be1c61e
      20:     0x7f4cce5ea20f - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
      21:     0x7f4cce5e8edc - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
      22:     0x7f4cce5fbe37 - rustc_hir[5dbb21eaf9590c92]::intravisit::walk_block::<rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
      23:     0x7f4cce5e8eee - <rustc_infer[9b42245fee805938]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[5dbb21eaf9590c92]::intravisit::Visitor>::visit_expr
      24:     0x7f4cce5a1714 - <rustc_infer[9b42245fee805938]::infer::InferCtxt>::emit_inference_failure_err
      25:     0x7f4cce4f32bb - <rustc_infer[9b42245fee805938]::infer::InferCtxt as rustc_trait_selection[af2ed82902f8af73]::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
      26:     0x7f4cce4e6f87 - <rustc_infer[9b42245fee805938]::infer::InferCtxt as rustc_trait_selection[af2ed82902f8af73]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
      27:     0x7f4ccec3fcb4 - <rustc_infer[9b42245fee805938]::infer::InferCtxtBuilder>::enter::<&rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults, <rustc_typeck[4b1a1a7c06e44333]::check::inherited::InheritedBuilder>::enter<rustc_typeck[4b1a1a7c06e44333]::check::typeck_with_fallback<rustc_typeck[4b1a1a7c06e44333]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>::{closure#0}>
      28:     0x7f4ccebd170a - rustc_typeck[4b1a1a7c06e44333]::check::typeck
      29:     0x7f4ccfccf5f0 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, rustc_span[c774ced8c61a5d44]::def_id::LocalDefId, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>
      30:     0x7f4ccf1f8380 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<rustc_span[c774ced8c61a5d44]::def_id::LocalDefId, &rustc_middle[c4bb946b42085c78]::ty::context::TypeckResults>>
      31:     0x7f4ccf123c0e - <rustc_query_impl[f03dd36fb3d62396]::Queries as rustc_middle[c4bb946b42085c78]::ty::query::QueryEngine>::typeck
      32:     0x7f4ccec91708 - <rustc_middle[c4bb946b42085c78]::hir::map::Map>::par_body_owners::<rustc_typeck[4b1a1a7c06e44333]::check::typeck_item_bodies::{closure#0}>
      33:     0x7f4ccfa8e18c - rustc_typeck[4b1a1a7c06e44333]::check::typeck_item_bodies
      34:     0x7f4ccfcee823 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, (), ()>
      35:     0x7f4ccfd991d5 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<(), ()>>
      36:     0x7f4ccfdc3331 - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::get_query::<rustc_query_impl[f03dd36fb3d62396]::queries::typeck_item_bodies, rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt>
      37:     0x7f4ccfac4473 - <rustc_session[d1b76e352c1a3b5b]::session::Session>::time::<(), rustc_typeck[4b1a1a7c06e44333]::check_crate::{closure#7}>
      38:     0x7f4ccfab109b - rustc_typeck[4b1a1a7c06e44333]::check_crate
      39:     0x7f4ccf86b017 - rustc_interface[94703aee012e7483]::passes::analysis
      40:     0x7f4ccfcea595 - <rustc_query_system[a1cbf340ec6d6f93]::dep_graph::graph::DepGraph<rustc_middle[c4bb946b42085c78]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c4bb946b42085c78]::ty::context::TyCtxt, (), core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      41:     0x7f4ccfd8f1fd - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::try_execute_query::<rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt, rustc_query_system[a1cbf340ec6d6f93]::query::caches::DefaultCache<(), core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>>
      42:     0x7f4ccfdd58ee - rustc_query_system[a1cbf340ec6d6f93]::query::plumbing::get_query::<rustc_query_impl[f03dd36fb3d62396]::queries::analysis, rustc_query_impl[f03dd36fb3d62396]::plumbing::QueryCtxt>
      43:     0x7f4ccf8282a7 - <rustc_interface[94703aee012e7483]::passes::QueryContext>::enter::<rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      44:     0x7f4ccf81234f - <rustc_interface[94703aee012e7483]::interface::Compiler>::enter::<rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}::{closure#2}, core[c8091fc9dea0c6cf]::result::Result<core[c8091fc9dea0c6cf]::option::Option<rustc_interface[94703aee012e7483]::queries::Linker>, rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      45:     0x7f4ccf83bd3f - rustc_span[c774ced8c61a5d44]::with_source_map::<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_interface[94703aee012e7483]::interface::create_compiler_and_run<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#1}>
      46:     0x7f4ccf8131e2 - <scoped_tls[a35f89285f520bf3]::ScopedKey<rustc_span[c774ced8c61a5d44]::SessionGlobals>>::set::<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      47:     0x7f4ccf82893f - std[f19dd7bb03296d5c]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[94703aee012e7483]::util::run_in_thread_pool_with_globals<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>
      48:     0x7f4ccf828a99 - <<std[f19dd7bb03296d5c]::thread::Builder>::spawn_unchecked_<rustc_interface[94703aee012e7483]::util::run_in_thread_pool_with_globals<rustc_interface[94703aee012e7483]::interface::run_compiler<core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>, rustc_driver[7b89ea061d8aedc7]::run_compiler::{closure#1}>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#0}, core[c8091fc9dea0c6cf]::result::Result<(), rustc_errors[ae611370a546922c]::ErrorGuaranteed>>::{closure#1} as core[c8091fc9dea0c6cf]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}

    error: internal compiler error: unexpected panic

    note: 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.63.0-nightly (a6b8c6954 2022-06-03) running on x86_64-unknown-linux-gnu

    note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

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

    query stack during panic:
    #0 [typeck] type-checking `main`
    dtolnay#1 [typeck_item_bodies] type-checking all item bodies
    dtolnay#2 [analysis] running analysis passes on this crate
    end of query stack
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. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. 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.

5 participants