Closed
Description
Code
Sorry for not having a minimized example. I hit this ICE on a recent PR that was merged to trunk.
Reproduction steps:
git clone https://github.com/artichoke/artichoke.git
cd artichoke
git checkout e829966939a6d8cadd8b4c3f99336d08b6bbfdd7
RUST_BACKTRACE=full cargo +nightly test -p spinoso-string
Meta
This repros on both Linux and macOS.
Linux
rustc 1.66.0-nightly (57f097ea2 2022-10-01)
binary: rustc
commit-hash: 57f097ea25f2c05f424fc9b9dc50dbd6d399845c
commit-date: 2022-10-01
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.2
macOS
rustc 1.66.0-nightly (57f097ea2 2022-10-01)
binary: rustc
commit-hash: 57f097ea25f2c05f424fc9b9dc50dbd6d399845c
commit-date: 2022-10-01
host: x86_64-apple-darwin
release: 1.66.0-nightly
LLVM version: 15.0.2
Error output
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued
error: internal compiler error: trimmed_def_paths constructed
|
= note: delayed at 0: <rustc_errors::Handler>::delay_good_path_bug::<&str>
1: rustc_middle::ty::print::pretty::trimmed_def_paths
2: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>::{closure#0}, std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
3: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
4: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::ArenaCache<(), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>>
5: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::trimmed_def_paths, rustc_query_impl::plumbing::QueryCtxt>
6: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::Printer>::print_def_path
7: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::pretty_print_type
8: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::comma_sep::<rustc_middle::ty::Ty, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::Ty>>>
9: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::pretty_fn_sig
10: <rustc_middle::ty::sty::FnSig as rustc_middle::ty::print::Print<rustc_middle::ty::print::pretty::FmtPrinter>>::print
11: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::in_binder::<rustc_middle::ty::sty::FnSig>
12: <rustc_middle::ty::print::pretty::FmtPrinter as rustc_middle::ty::print::pretty::PrettyPrinter>::pretty_print_type
13: <rustc_middle::ty::Ty as core::fmt::Display>::fmt
14: <rustc_infer::infer::InferCtxt>::ty_to_string
15: <rustc_errors::diagnostic::Diagnostic>::set_primary_message::<rustc_error_messages::DelayDm<<rustc_hir_analysis::check::cast::CastCheck>::trivial_cast_lint::{closure#0}>>
16: rustc_middle::lint::struct_lint_level::<rustc_error_messages::DelayDm<<rustc_hir_analysis::check::cast::CastCheck>::trivial_cast_lint::{closure#0}>, <rustc_hir_analysis::check::cast::CastCheck>::trivial_cast_lint::{closure#1}>
17: <rustc_hir_analysis::check::cast::CastCheck>::check
18: <rustc_hir_analysis::check::inherited::InheritedBuilder>::enter::<rustc_hir_analysis::check::typeck_with_fallback<rustc_hir_analysis::check::typeck::{closure#0}>::{closure#1}, &rustc_middle::ty::context::TypeckResults>
19: rustc_hir_analysis::check::typeck
20: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>
21: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
22: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
23: rustc_data_structures::sync::par_for_each_in::<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_hir_analysis::check::typeck_item_bodies::{closure#0}>::{closure#0}>
24: rustc_hir_analysis::check::typeck_item_bodies
25: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), ()>
26: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), ()>>
27: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
28: <rustc_session::session::Session>::time::<(), rustc_hir_analysis::check_crate::{closure#7}>
29: rustc_hir_analysis::check_crate
30: rustc_interface::passes::analysis
31: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
32: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
33: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
34: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
35: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
36: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
37: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
38: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
39: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1938:9
40: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/alloc/src/boxed.rs:1938:9
41: std::sys::unix::thread::Thread::new::thread_start
at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/sys/unix/thread.rs:108:17
42: start_thread
43: clone
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1536:13
stack backtrace:
0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
1: std::panic::panic_any::<rustc_errors::ExplicitBug>
2: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
3: core::ptr::drop_in_place::<rustc_session::parse::ParseSess>
4: <alloc::rc::Rc<rustc_session::session::Session> as core::ops::drop::Drop>::drop
5: core::ptr::drop_in_place::<rustc_interface::interface::Compiler>
6: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
7: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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.66.0-nightly (57f097ea2 2022-10-01) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED] -Z sanitizer=leak
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `spinoso-string`
warning: build failed, waiting for other jobs to finish...
Backtrace
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1536:13
stack backtrace:
0: 0x106a1ae32 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hba27fb90d7050870
1: 0x106a724fa - core::fmt::write::h7547fc57d25c3206
2: 0x106a0ce9c - std::io::Write::write_fmt::hbd85aaf99ede96f5
3: 0x106a1decb - std::panicking::default_hook::{{closure}}::he3b4a1e8351ae4bb
4: 0x106a1dbd7 - std::panicking::default_hook::h4fbc7e499b5ff3eb
5: 0x11008f50a - rustc_driver[d78acdbdd1a85c5e]::DEFAULT_HOOK::{closure#0}::{closure#0}
6: 0x106a1e63a - std::panicking::rust_panic_with_hook::h587efc769e58e5b9
7: 0x114a675c7 - std[5bfe49892ceac913]::panicking::begin_panic::<rustc_errors[780965bb6a6534a3]::ExplicitBug>::{closure#0}
8: 0x114a658f9 - std[5bfe49892ceac913]::sys_common::backtrace::__rust_end_short_backtrace::<std[5bfe49892ceac913]::panicking::begin_panic<rustc_errors[780965bb6a6534a3]::ExplicitBug>::{closure#0}, !>
9: 0x114e14359 - std[5bfe49892ceac913]::panicking::begin_panic::<rustc_errors[780965bb6a6534a3]::ExplicitBug>
10: 0x114a577e9 - std[5bfe49892ceac913]::panic::panic_any::<rustc_errors[780965bb6a6534a3]::ExplicitBug>
11: 0x114a5ad4b - <rustc_errors[780965bb6a6534a3]::HandlerInner as core[3005dc2ccb678d2b]::ops::drop::Drop>::drop
12: 0x1100beb3a - core[3005dc2ccb678d2b]::ptr::drop_in_place::<rustc_session[6529e9931cfdfd51]::parse::ParseSess>
13: 0x1100c4e0b - <alloc[556de35ec3c0822]::rc::Rc<rustc_session[6529e9931cfdfd51]::session::Session> as core[3005dc2ccb678d2b]::ops::drop::Drop>::drop
14: 0x11010f722 - core[3005dc2ccb678d2b]::ptr::drop_in_place::<rustc_interface[7c80bed658274b02]::interface::Compiler>
15: 0x11010d560 - rustc_span[d14c6cd7f6d28ce6]::with_source_map::<core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>, rustc_interface[7c80bed658274b02]::interface::create_compiler_and_run<core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>, rustc_driver[d78acdbdd1a85c5e]::run_compiler::{closure#1}>::{closure#1}>
16: 0x1100b04a0 - rustc_interface[7c80bed658274b02]::interface::create_compiler_and_run::<core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>, rustc_driver[d78acdbdd1a85c5e]::run_compiler::{closure#1}>
17: 0x110101c45 - <scoped_tls[ae26946fbd72bccc]::ScopedKey<rustc_span[d14c6cd7f6d28ce6]::SessionGlobals>>::set::<rustc_interface[7c80bed658274b02]::interface::run_compiler<core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>, rustc_driver[d78acdbdd1a85c5e]::run_compiler::{closure#1}>::{closure#0}, core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>>
18: 0x1100cb2ba - std[5bfe49892ceac913]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[7c80bed658274b02]::util::run_in_thread_pool_with_globals<rustc_interface[7c80bed658274b02]::interface::run_compiler<core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>, rustc_driver[d78acdbdd1a85c5e]::run_compiler::{closure#1}>::{closure#0}, core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>>::{closure#0}, core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>>
19: 0x1100cf5a8 - <<std[5bfe49892ceac913]::thread::Builder>::spawn_unchecked_<rustc_interface[7c80bed658274b02]::util::run_in_thread_pool_with_globals<rustc_interface[7c80bed658274b02]::interface::run_compiler<core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>, rustc_driver[d78acdbdd1a85c5e]::run_compiler::{closure#1}>::{closure#0}, core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>>::{closure#0}, core[3005dc2ccb678d2b]::result::Result<(), rustc_errors[780965bb6a6534a3]::ErrorGuaranteed>>::{closure#1} as core[3005dc2ccb678d2b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
20: 0x106a27347 - std::sys::unix::thread::Thread::new::thread_start::hd7c1373e88e5a03c
21: 0x7ff8105324e1 - __pthread_start