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

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/897e37553bba8b42751c67658967889d11ecd120/compiler/rustc_errors/src/lib.rs:1462:9 #10034

Closed
karolh2000 opened this issue Dec 5, 2022 · 3 comments

Comments

@karolh2000
Copy link

karolh2000 commented Dec 5, 2022

Log error (rust/clippy 1.65)

cargo clippy
    Checking cfg-if v1.0.0
    Checking once_cell v1.16.0
    Checking pin-project-lite v0.2.9
    Checking libc v0.2.137
    Checking memchr v2.5.0
    Checking futures-sink v0.3.24
    Checking futures-core v0.3.24
    Checking slab v0.4.7
    Checking futures-task v0.3.24
    Checking serde v1.0.148
    Checking pin-utils v0.1.0
    Checking futures-io v0.3.24
    Checking log v0.4.17
    Checking typenum v1.15.0
    Checking subtle v2.4.1
    Checking byteorder v1.4.3
    Checking scopeguard v1.1.0
    Checking futures-channel v0.3.24
    Checking smallvec v1.9.0
    Checking ppv-lite86 v0.2.16
    Checking thiserror v1.0.37
    Checking fnv v1.0.7
    Checking tinyvec_macros v0.1.0
    Checking percent-encoding v2.2.0
    Checking cpufeatures v0.2.2
    Checking tinyvec v1.6.0
    Checking zeroize v1.5.7
    Checking lock_api v0.4.7
    Checking unicode-bidi v0.3.8
    Checking arrayvec v0.7.2
    Checking static_assertions v1.1.0
    Checking form_urlencoded v1.1.0
    Checking constant_time_eq v0.1.5
    Checking arrayref v0.3.6
    Checking futures-util v0.3.24
    Checking bitflags v1.3.2
    Checking data-encoding v2.3.2
    Checking byte-slice-cast v1.2.1
    Checking const-oid v0.9.1
    Checking pin-project v1.0.12
    Checking instant v0.1.12
    Checking keccak v0.1.2
    Checking either v1.7.0
    Checking base64ct v1.5.3
    Checking blake2s_simd v1.0.0
    Checking der v0.6.0
    Checking generic-array v0.14.6
    Checking blake2b_simd v1.0.0
    Checking core2 v0.4.0
    Checking parity-scale-codec v2.3.1
    Checking data-encoding-macro v0.1.12
    Checking opaque-debug v0.3.0
    Checking base-x v0.2.11
    Checking signature v1.6.4
    Checking base16ct v0.1.1
    Checking multibase v0.9.1
    Checking futures-timer v3.0.2
    Checking asn1_der v0.7.5
    Checking bs58 v0.4.0
    Checking unicode-normalization v0.1.21
    Checking void v1.0.2
    Checking tracing-core v0.1.29
    Checking itoa v1.0.3
    Checking anyhow v1.0.66
    Checking ipnet v2.5.0
    Checking crypto-common v0.1.6
    Checking block-buffer v0.10.2
    Checking num_cpus v1.13.1
    Checking getrandom v0.2.7
    Checking mio v0.8.4
    Checking socket2 v0.4.7
    Checking digest v0.10.5
    Checking getrandom v0.1.16
    Checking parking_lot_core v0.9.3
    Checking rand_core v0.6.3
    Checking digest v0.9.0
    Checking idna v0.3.0
    Checking spki v0.6.0
    Checking rand_core v0.5.1
    Checking ahash v0.7.6
    Checking block-buffer v0.9.0
    Checking sha2 v0.10.6
    Checking blake3 v1.3.1
    Checking parking_lot v0.12.1
    Checking rand_chacha v0.3.1
    Checking sha3 v0.10.2
    Checking pkcs8 v0.9.0
    Checking sha2 v0.9.9
    Checking curve25519-dalek v3.2.0
    Checking rand_chacha v0.2.2
    Checking hashbrown v0.12.3
    Checking rand v0.8.5
    Checking sec1 v0.3.0
    Checking tracing v0.1.36
    Checking netlink-packet-utils v0.5.1
    Checking quick-error v1.2.3
    Checking rand v0.7.3
    Checking lazy_static v1.4.0
    Checking url v2.3.1
    Checking netlink-packet-core v0.4.2
    Checking crossbeam-utils v0.8.11
    Checking matches v0.1.9
    Checking match_cfg v0.1.0
    Checking foreign-types-shared v0.1.1
    Checking idna v0.2.3
    Checking hostname v0.3.1
    Checking foreign-types v0.3.2
    Checking netlink-packet-route v0.12.0
    Checking memoffset v0.6.5
    Checking crunchy v0.2.2
    Checking nix v0.24.2
    Checking openssl-sys v0.9.75
    Checking httpdate v1.0.2
    Checking indexmap v1.9.1
    Checking termcolor v1.1.3
    Checking try-lock v0.2.3
    Checking linked-hash-map v0.5.6
    Checking nohash-hasher v0.2.0
    Checking spin v0.5.2
    Checking hex v0.4.3
    Checking ryu v1.0.11
    Checking untrusted v0.7.1
    Checking want v0.3.0
    Checking ring v0.16.20
    Checking crossbeam-epoch v0.9.10
    Checking lru-cache v0.1.2
    Checking resolv-conf v0.7.0
    Checking httparse v1.8.0
    Checking io-lifetimes v1.0.3
    Checking uint v0.9.3
    Checking dirs-sys v0.3.7
    Checking aho-corasick v0.7.18
    Checking linux-raw-sys v0.1.3
    Checking bytes v1.3.0
    Checking serde-big-array v0.3.3
    Checking serde_bytes v0.11.7
    Checking ed25519 v1.5.2
    Checking openssl v0.10.41
    Checking regex-syntax v0.6.27
    Checking mime v0.3.16
    Checking openssl-probe v0.1.5
    Checking ed25519-dalek v1.0.1
    Checking tower-service v0.3.2
    Checking base64 v0.13.0
    Checking crossbeam-deque v0.8.2
    Checking serde_json v1.0.83
    Checking tokio v1.22.0
    Checking prost v0.11.2
    Checking http v0.2.8
    Checking parking_lot_core v0.8.5
    Checking x25519-dalek v1.1.1
    Checking futures-executor v0.3.24
    Checking asynchronous-codec v0.6.1
    Checking rustix v0.36.4
    Checking lru v0.8.1
    Checking futures v0.3.24
    Checking snow v0.9.0
    Checking crossbeam-channel v0.5.6
    Checking rw-stream-sink v0.3.0
    Checking yamux v0.10.2
    Checking unsigned-varint v0.7.1
    Checking atty v0.2.14
    Checking os_str_bytes v6.3.0
    Checking multihash v0.16.0
    Checking multistream-select v0.12.1
    Checking prost-codec v0.3.0
    Checking rustc-hex v2.1.0
    Checking http-body v0.4.5
    Checking headers-core v0.2.0
    Checking clap_lex v0.3.0
    Checking rayon-core v1.9.3
    Checking parking_lot v0.11.2
    Checking fixed-hash v0.8.0
    Checking serde_urlencoded v0.7.1
    Checking multiaddr v0.16.0
    Checking unicase v2.6.0
    Checking humantime v1.3.0
    Checking sha-1 v0.10.0
    Checking bit-vec v0.6.3
    Checking cfg-if v0.1.10
    Checking strsim v0.10.0
    Checking directories v2.0.2
    Checking mime_guess v2.0.4
    Checking headers v0.3.7
    Checking primitive-types v0.12.1
    Checking aleph-bft v0.8.4
    Checking libsqlite3-sys v0.25.1
    Checking encoding_rs v0.8.31
    Checking libp2p-core v0.38.0
    Checking rayon v1.5.3
    Checking regex v1.6.0
    Checking is-terminal v0.4.1
    Checking clap v4.0.29
    Checking rustls-pemfile v0.2.1
    Checking dirs v4.0.0
    Checking bincode v1.3.3
    Checking toml v0.5.9
    Checking hashlink v0.8.0
    Checking dashmap v5.3.4
    Checking fallible-streaming-iterator v0.1.9
    Checking libp2p-mplex v0.38.0
    Checking libp2p-noise v0.41.0
    Checking libp2p-yamux v0.42.0
    Checking env_logger v0.7.1
    Checking same-file v1.0.6
    Checking native-tls v0.2.10
    Checking scoped-tls v1.0.0
    Checking utf8-width v0.1.6
    Checking fallible-iterator v0.2.0
    Checking humantime v2.1.0
    Checking byte-unit v4.0.14
    Checking confy v0.5.0
    Checking pretty_env_logger v0.4.0
    Checking walkdir v2.3.2
    Checking serial_test v0.9.0
    Checking derive_builder v0.11.2
    Checking error-chain v0.12.4
    Checking num-traits v0.2.15
    Checking uuid v1.2.2
    Checking filename v0.1.1
    Checking itertools v0.10.5
    Checking env_logger v0.9.0
    Checking strum v0.24.1
    Checking maplit v1.0.2
    Checking stringreader v0.1.1
    Checking fs_extra v1.2.0
    Checking rusqlite v0.28.0
    Checking libp2p-swarm v0.41.0
    Checking netlink-sys v0.8.3
    Checking tokio-util v0.7.3
    Checking trust-dns-proto v0.22.0
    Checking tokio-native-tls v0.3.0
    Checking tokio-stream v0.1.11
    Checking sysinfo v0.26.4
    Checking netlink-proto v0.10.0
    Checking rtnetlink v0.10.1
    Checking h2 v0.3.14
    Checking if-watch v3.0.0
    Checking libp2p-request-response v0.23.0
    Checking libp2p-identify v0.41.0
    Checking libp2p-kad v0.42.0
    Checking libp2p-tcp v0.38.0
    Checking libp2p-autonat v0.9.0
    Checking trust-dns-resolver v0.22.0
    Checking libp2p-dns v0.38.0
    Checking libp2p v0.50.0
    Checking pyrsia_blockchain_network v0.2.1 (/home/***/trunk/pyrsia/src/blockchain)
    Checking hyper v0.14.23
    Checking hyper-tls v0.5.0
    Checking warp v0.3.3
    Checking reqwest v0.11.11
    Checking pyrsia v0.2.1 (/home/***/trunk/pyrsia)
error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:626:9: type parameter `Self/#0` (Self/0) out of range when substituting, substs=[]

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/897e37553bba8b42751c67658967889d11ecd120/compiler/rustc_errors/src/lib.rs:1462:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.65 (897e375 2022-11-02)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `pyrsia`
***@kornilaptop:~/trunk/pyrsia$ RUST_BACKTRACE=1 cargo clippy
    Checking pyrsia v0.2.1 (/home/***/trunk/pyrsia)
error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:626:9: type parameter `Self/#0` (Self/0) out of range when substituting, substs=[]

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/897e37553bba8b42751c67658967889d11ecd120/compiler/rustc_errors/src/lib.rs:1462:9
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner>::bug::<&alloc::string::String>
   3: <rustc_errors::Handler>::bug::<&alloc::string::String>
   4: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
   5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
   6: rustc_middle::util::bug::bug_fmt
   7: <rustc_middle::ty::subst::SubstFolder>::type_param_out_of_range
   8: <rustc_middle::ty::subst::SubstFolder as rustc_middle::ty::fold::TypeFolder>::fold_ty
   9: <&rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg> as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_middle::ty::subst::SubstFolder>
  10: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::try_fold_with::<rustc_middle::ty::subst::SubstFolder>
  11: <rustc_middle::ty::subst::SubstFolder as rustc_middle::ty::fold::FallibleTypeFolder>::try_fold_binder::<rustc_middle::ty::PredicateKind>
  12: <core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::Predicate>> as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::adapters::filter::filter_try_fold<rustc_middle::ty::Predicate, (), core::ops::control_flow::ControlFlow<()>, clippy_lints::methods::unnecessary_to_owned::can_change_type::{closure#5}, core::iter::traits::iterator::Iterator::any::check<rustc_middle::ty::Predicate, clippy_lints::methods::unnecessary_to_owned::can_change_type::{closure#7}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow<()>>
  13: clippy_lints::methods::unnecessary_to_owned::can_change_type
  14: clippy_lints::methods::unnecessary_to_owned::check
  15: <clippy_lints::methods::Methods as rustc_lint::passes::LateLintPass>::check_expr
  16: <rustc_lint::early::EarlyLintPassObjects as rustc_lint::passes::EarlyLintPass>::check_generic_arg
  17: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  18: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  19: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  20: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  21: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  22: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  23: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  24: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  25: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  26: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  27: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  28: rustc_hir::intravisit::walk_block::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  29: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  30: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  31: rustc_hir::intravisit::walk_local::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  32: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_local
  33: rustc_hir::intravisit::walk_block::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  34: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  35: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  36: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_body
  37: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_fn
  38: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  39: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  40: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  41: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  42: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  43: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  44: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
  45: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
  46: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_body
  47: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_fn
  48: rustc_hir::intravisit::walk_impl_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  49: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_impl_item
  50: rustc_hir::intravisit::walk_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  51: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
  52: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  53: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
  54: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  55: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
  56: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
  57: rustc_lint::late::late_lint_pass_crate::<rustc_lint::late::LateLintPassObjects>
  58: rustc_lint::late::late_lint_crate::<rustc_lint::BuiltinCombinedLateLintPass>
  59: <rustc_session::session::Session>::time::<(), rustc_lint::late::check_crate<rustc_lint::BuiltinCombinedLateLintPass, rustc_interface::passes::analysis::{closure#5}::{closure#1}::{closure#2}::{closure#0}::{closure#0}>::{closure#0}::{closure#0}>
  60: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}::{closure#1}::{closure#2}::{closure#0}>
  61: <core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::analysis::{closure#5}::{closure#1}> as core::ops::function::FnOnce<()>>::call_once
  62: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}>
  63: rustc_interface::passes::analysis
  64: <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>>
  65: 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>>>
  66: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  67: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  68: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
  69: <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-clippy/issues/new

note: Clippy version: clippy 0.1.65 (897e375 2022-11-02)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `pyrsia`
@karolh2000 karolh2000 changed the title thread 'rustc' panicked at 'Box<dyn Any>', /rustc/897e37553bba8b42751c67658967889d11ecd120/compiler/rustc_errors/src/lib.rs:1462:9 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'rustc' panicked at 'Box<dyn Any>', /rustc/897e37553bba8b42751c67658967889d11ecd120/compiler/rustc_errors/src/lib.rs:1462:9 Dec 5, 2022
@giraffate
Copy link
Contributor

It looks like that it' a duplicate of #10021.

@karolh2000
Copy link
Author

@giraffate It's very likely this problem is duplicate of #10021. I'm not able to reproduce it with nightly

nightly-aarch64-apple-darwin unchanged - rustc 1.67.0-nightly (53e4b9dd7 2022-12-04)
clippy 0.1.67 (53e4b9dd 2022-12-04)

Closing this issue.

@giraffate
Copy link
Contributor

Thanks for checking it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants