Skip to content

Instantly share code, notes, and snippets.

@yaahc
Created November 4, 2022 23:42
Show Gist options
  • Save yaahc/db2dca7b34c499ab15d721a518b2f2b2 to your computer and use it in GitHub Desktop.
Save yaahc/db2dca7b34c499ab15d721a518b2f2b2 to your computer and use it in GitHub Desktop.
tracing error BABYYY
gh-yaahc@dev-desktop:~/ice-breaker/src$ RUSTC_ICE_LOG=trace RUSTFLAGS="-Ztreat-err-as-bug" cargo build
Compiling ice-breaker v0.1.0 (/home/gh-yaahc/ice-breaker)
error[E0117]: only traits defined in the current crate can be implemented for types defined outside of the crate
--> src/main.rs:5:1
|
5 | impl std::error::Error for std::env::VarError {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------
| | |
| | `VarError` is not defined in the current crate
| impl doesn't use only types from inside the current crate
|
= note: define and implement a trait or new type instead
thread 'rustc' panicked at 'aborting after 1 errors and 1 delayed bugs due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1614:25
stack backtrace:
0: 0x7f8cd77c7387 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0ac2ea97e3cf30c9
1: 0x7f8cd783721e - core::fmt::write::h1947dda6f77618f7
2: 0x7f8cd77edd31 - std::io::Write::write_fmt::h4e926777e0401f53
3: 0x7f8cd77c71aa - std::sys_common::backtrace::print::hc253af04f947a2d9
4: 0x7f8cd77b0c37 - std::panicking::default_hook::{{closure}}::heb22674f359833ad
5: 0x7f8cd77b0a64 - std::panicking::default_hook::hedfb6d86d6207e1f
6: 0x7f8cd80e46c7 - rustc_driver[204511054ad1a209]::DEFAULT_HOOK::{closure#0}::{closure#0}
7: 0x7f8cd77b10b4 - std::panicking::rust_panic_with_hook::hd92bb504f9f739ef
8: 0x7f8cd77d8397 - std::panicking::begin_panic_handler::{{closure}}::h72d0c618d4eed7d3
9: 0x7f8cd77d82cc - std::sys_common::backtrace::__rust_end_short_backtrace::h14e1ab08822aed2b
10: 0x7f8cd77b0d0a - rust_begin_unwind
11: 0x7f8cd77981c3 - core::panicking::panic_fmt::h8019cfc2a2631521
12: 0x7f8cda5c982b - <rustc_errors[b598992ed80ed4c7]::HandlerInner>::panic_if_treat_err_as_bug
13: 0x7f8cda5c9530 - <rustc_errors[b598992ed80ed4c7]::HandlerInner>::emit_diagnostic
14: 0x7f8cda5c6050 - <rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed as rustc_errors[b598992ed80ed4c7]::diagnostic_builder::EmissionGuarantee>::diagnostic_builder_emit_producing_guarantee
15: 0x7f8cd87807ca - rustc_hir_analysis[515b29b78a3cc25c]::coherence::orphan::orphan_check_impl
16: 0x7f8cd977e3a4 - <rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind as rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::graph::DepGraph<rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ab26c65530fe33be]::ty::context::TyCtxt, rustc_span[e74d4e602271ea94]::def_id::LocalDefId, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>
17: 0x7f8cd986cc4d - <rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::graph::DepGraph<rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ab26c65530fe33be]::ty::context::TyCtxt, rustc_span[e74d4e602271ea94]::def_id::LocalDefId, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>
18: 0x7f8cd96404ae - rustc_query_system[e60e9e49e2d6c2a5]::query::plumbing::try_execute_query::<rustc_query_impl[f8d2f3f0e302639d]::plumbing::QueryCtxt, rustc_query_system[e60e9e49e2d6c2a5]::query::caches::DefaultCache<rustc_span[e74d4e602271ea94]::def_id::LocalDefId, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>>
19: 0x7f8cd971216c - rustc_query_system[e60e9e49e2d6c2a5]::query::plumbing::get_query::<rustc_query_impl[f8d2f3f0e302639d]::queries::orphan_check_impl, rustc_query_impl[f8d2f3f0e302639d]::plumbing::QueryCtxt>
20: 0x7f8cd94b12e8 - <rustc_query_impl[f8d2f3f0e302639d]::Queries as rustc_middle[ab26c65530fe33be]::ty::query::QueryEngine>::orphan_check_impl
21: 0x7f8cd8083d3d - rustc_trait_selection[d30cf4e1380efcd6]::traits::specialize::report_overlap_conflict
22: 0x7f8cda084c3d - rustc_trait_selection[d30cf4e1380efcd6]::traits::specialize::specialization_graph_provider
23: 0x7f8cd9781498 - <rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind as rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::graph::DepGraph<rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ab26c65530fe33be]::ty::context::TyCtxt, rustc_span[e74d4e602271ea94]::def_id::DefId, rustc_middle[ab26c65530fe33be]::traits::specialization_graph::Graph>::{closure#0}, rustc_middle[ab26c65530fe33be]::traits::specialization_graph::Graph>
24: 0x7f8cd988375a - <rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::graph::DepGraph<rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ab26c65530fe33be]::ty::context::TyCtxt, rustc_span[e74d4e602271ea94]::def_id::DefId, rustc_middle[ab26c65530fe33be]::traits::specialization_graph::Graph>
25: 0x7f8cd9617157 - rustc_query_system[e60e9e49e2d6c2a5]::query::plumbing::try_execute_query::<rustc_query_impl[f8d2f3f0e302639d]::plumbing::QueryCtxt, rustc_query_system[e60e9e49e2d6c2a5]::query::caches::ArenaCache<rustc_span[e74d4e602271ea94]::def_id::DefId, rustc_middle[ab26c65530fe33be]::traits::specialization_graph::Graph>>
26: 0x7f8cd97310e6 - rustc_query_system[e60e9e49e2d6c2a5]::query::plumbing::get_query::<rustc_query_impl[f8d2f3f0e302639d]::queries::specialization_graph_of, rustc_query_impl[f8d2f3f0e302639d]::plumbing::QueryCtxt>
27: 0x7f8cd94c0d32 - <rustc_query_impl[f8d2f3f0e302639d]::Queries as rustc_middle[ab26c65530fe33be]::ty::query::QueryEngine>::specialization_graph_of
28: 0x7f8cd87854c8 - rustc_hir_analysis[515b29b78a3cc25c]::coherence::coherent_trait
29: 0x7f8cd978225e - <rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind as rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::graph::DepGraph<rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ab26c65530fe33be]::ty::context::TyCtxt, rustc_span[e74d4e602271ea94]::def_id::DefId, ()>::{closure#0}, ()>
30: 0x7f8cd988a48d - <rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::graph::DepGraph<rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ab26c65530fe33be]::ty::context::TyCtxt, rustc_span[e74d4e602271ea94]::def_id::DefId, ()>
31: 0x7f8cd9677581 - rustc_query_system[e60e9e49e2d6c2a5]::query::plumbing::try_execute_query::<rustc_query_impl[f8d2f3f0e302639d]::plumbing::QueryCtxt, rustc_query_system[e60e9e49e2d6c2a5]::query::caches::DefaultCache<rustc_span[e74d4e602271ea94]::def_id::DefId, ()>>
32: 0x7f8cd9703983 - rustc_query_system[e60e9e49e2d6c2a5]::query::plumbing::get_query::<rustc_query_impl[f8d2f3f0e302639d]::queries::coherent_trait, rustc_query_impl[f8d2f3f0e302639d]::plumbing::QueryCtxt>
33: 0x7f8cd94af852 - <rustc_query_impl[f8d2f3f0e302639d]::Queries as rustc_middle[ab26c65530fe33be]::ty::query::QueryEngine>::coherent_trait
34: 0x7f8cd881ccaf - <rustc_session[df983e0aef21dd2]::session::Session>::track_errors::<rustc_hir_analysis[515b29b78a3cc25c]::check_crate::{closure#3}, ()>
35: 0x7f8cd872c97d - rustc_hir_analysis[515b29b78a3cc25c]::check_crate
36: 0x7f8cd8204ed1 - rustc_interface[2f9f4e7fcd42bf56]::passes::analysis
37: 0x7f8cd97851de - <rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind as rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::graph::DepGraph<rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ab26c65530fe33be]::ty::context::TyCtxt, (), core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>
38: 0x7f8cd98a0265 - <rustc_query_system[e60e9e49e2d6c2a5]::dep_graph::graph::DepGraph<rustc_middle[ab26c65530fe33be]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ab26c65530fe33be]::ty::context::TyCtxt, (), core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>
39: 0x7f8cd9687003 - rustc_query_system[e60e9e49e2d6c2a5]::query::plumbing::try_execute_query::<rustc_query_impl[f8d2f3f0e302639d]::plumbing::QueryCtxt, rustc_query_system[e60e9e49e2d6c2a5]::query::caches::DefaultCache<(), core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>>
40: 0x7f8cd974ca60 - rustc_query_system[e60e9e49e2d6c2a5]::query::plumbing::get_query::<rustc_query_impl[f8d2f3f0e302639d]::queries::analysis, rustc_query_impl[f8d2f3f0e302639d]::plumbing::QueryCtxt>
41: 0x7f8cd948faae - <rustc_query_impl[f8d2f3f0e302639d]::Queries as rustc_middle[ab26c65530fe33be]::ty::query::QueryEngine>::analysis
42: 0x7f8cd8153b33 - <rustc_interface[2f9f4e7fcd42bf56]::passes::QueryContext>::enter::<rustc_driver[204511054ad1a209]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>
43: 0x7f8cd8152e3c - <rustc_interface[2f9f4e7fcd42bf56]::interface::Compiler>::enter::<rustc_driver[204511054ad1a209]::run_compiler::{closure#1}::{closure#2}, core[a070f3793fd2ce8]::result::Result<core[a070f3793fd2ce8]::option::Option<rustc_interface[2f9f4e7fcd42bf56]::queries::Linker>, rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>
44: 0x7f8cd8151f12 - rustc_span[e74d4e602271ea94]::with_source_map::<core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>, rustc_interface[2f9f4e7fcd42bf56]::interface::run_compiler<core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>, rustc_driver[204511054ad1a209]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
45: 0x7f8cd80e9863 - <scoped_tls[10d8a9c768e14d1c]::ScopedKey<rustc_span[e74d4e602271ea94]::SessionGlobals>>::set::<rustc_interface[2f9f4e7fcd42bf56]::interface::run_compiler<core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>, rustc_driver[204511054ad1a209]::run_compiler::{closure#1}>::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>
46: 0x7f8cd80fd16a - std[4883b2ae564401af]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[2f9f4e7fcd42bf56]::util::run_in_thread_pool_with_globals<rustc_interface[2f9f4e7fcd42bf56]::interface::run_compiler<core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>, rustc_driver[204511054ad1a209]::run_compiler::{closure#1}>::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>
47: 0x7f8cd80dd12e - std[4883b2ae564401af]::panicking::try::<core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>, core[a070f3793fd2ce8]::panic::unwind_safe::AssertUnwindSafe<<std[4883b2ae564401af]::thread::Builder>::spawn_unchecked_<rustc_interface[2f9f4e7fcd42bf56]::util::run_in_thread_pool_with_globals<rustc_interface[2f9f4e7fcd42bf56]::interface::run_compiler<core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>, rustc_driver[204511054ad1a209]::run_compiler::{closure#1}>::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>::{closure#1}::{closure#0}>>
48: 0x7f8cd80d38dc - <<std[4883b2ae564401af]::thread::Builder>::spawn_unchecked_<rustc_interface[2f9f4e7fcd42bf56]::util::run_in_thread_pool_with_globals<rustc_interface[2f9f4e7fcd42bf56]::interface::run_compiler<core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>, rustc_driver[204511054ad1a209]::run_compiler::{closure#1}>::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a070f3793fd2ce8]::result::Result<(), rustc_errors[b598992ed80ed4c7]::ErrorGuaranteed>>::{closure#1} as core[a070f3793fd2ce8]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
49: 0x7f8cd77a8408 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7d766e7673d06e93
50: 0x7f8cd779e137 - std::sys::unix::thread::Thread::new::thread_start::h2b67a70cd76f57b5
51: 0x7f8cd07cc609 - start_thread
at /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8
52: 0x7f8cd764f163 - clone
53: 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.67.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED] -Z treat-err-as-bug
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [orphan_check_impl] checking whether impl `<impl at src/main.rs:5:1: 5:46>` follows the orphan rules
#1 [specialization_graph_of] building specialization graph of trait `core::error::Error`
#2 [coherent_trait] coherence checking all impls of trait `core::error::Error`
#3 [analysis] running analysis passes on this crate
end of query stack
SpanTrace:
0: rustc_hir_analysis::coherence::orphan::orphan_check_impl
with impl_def_id=DefId(0:4 ~ ice_breaker[0fa8]::{impl#0})
at compiler/rustc_hir_analysis/src/coherence/orphan.rs:20
1: rustc_query_impl::orphan_check_impl
with span=no-location (#0) key=DefId(0:4 ~ ice_breaker[0fa8]::{impl#0}) mode=Get
at compiler/rustc_query_impl/src/lib.rs:47
2: rustc_query_impl::specialization_graph_of
with span=no-location (#0) key=DefId(2:3317 ~ core[4507]::error::Error) mode=Ensure
at compiler/rustc_query_impl/src/lib.rs:47
3: rustc_query_impl::coherent_trait
with span=no-location (#0) key=DefId(2:3317 ~ core[4507]::error::Error) mode=Ensure
at compiler/rustc_query_impl/src/lib.rs:47
4: rustc_query_impl::analysis
with span=no-location (#0) key=() mode=Get
at compiler/rustc_query_impl/src/lib.rs:47
error: could not compile `ice-breaker` due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment