Closed lgarczyn closed 3 years ago
How do I reproduce this? Just building it with cargo +nightly build
in a library, or with rustc +nightly test.rs --crate-type=rlib
do not generate any errors.
After running rustup default stable
then rustup default nightly
, the crash has disappeared. I have no more information, sorry.
I was testing out const_panic
to try and get casting overflow errors in const expr
Managed to recreate it, it's probably due to my macro library
Here's the full project as it was during the last crash: https://github.com/lgarczyn/polymorphic-constant/tree/rust-crash
To cause the crash simply run cargo test
on nightly
Thanks for filing the bug report! We just shipped a patch release to work around this issue and are currently triaging related issues related to ensure each underlying problem gets resolved. Since this appears to be a duplicate of #83259, I'm going to close in favor of that issue.
Code
Meta
Error output
Backtrace
```stack backtrace: 0: rust_begin_unwind at /rustc/d0695c9081b16077d0aed368bccaf437d77ff497/library/std/src/panicking.rs:493:5 1: core::panicking::panic_fmt at /rustc/d0695c9081b16077d0aed368bccaf437d77ff497/library/core/src/panicking.rs:92:14 2: core::panicking::assert_failed_inner 3: core::panicking::assert_failed 4: rustc_query_system::query::plumbing::incremental_verify_ich 5: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory 6: rustc_query_system::query::plumbing::get_query_impl 7:::predicates_of
8: rustc_middle::ty::generics::GenericPredicates::instantiate_into
9: rustc_middle::ty::generics::GenericPredicates::instantiate
10: rustc_typeck::check::fn_ctxt::_impl::::instantiate_bounds
11: rustc_typeck::check::fn_ctxt::_impl::::add_required_obligations
12: rustc_typeck::check::fn_ctxt::_impl::::instantiate_value_path
13: rustc_typeck::check::expr::::check_expr_kind
14: rustc_typeck::check::expr::::check_expr_with_expectation
15: rustc_typeck::check::fn_ctxt::checks::::check_argument_types
16: rustc_typeck::check::callee::::confirm_builtin_call
17: rustc_typeck::check::callee::::check_call
18: rustc_typeck::check::expr::::check_expr_kind
19: rustc_typeck::check::expr::::check_expr_with_expectation
20: rustc_typeck::check::expr::::check_expr_kind
21: rustc_typeck::check::expr::::check_expr_with_expectation
22: rustc_typeck::check::_match::::check_match
23: rustc_typeck::check::expr::::check_expr_kind
24: rustc_typeck::check::expr::::check_expr_with_expectation
25: rustc_typeck::check::expr::::check_expr_kind
26: rustc_typeck::check::expr::::check_expr_with_expectation
27: rustc_typeck::check::fn_ctxt::checks::::check_argument_types
28: rustc_typeck::check::callee::::confirm_builtin_call
29: rustc_typeck::check::callee::::check_call
30: rustc_typeck::check::expr::::check_expr_kind
31: rustc_typeck::check::expr::::check_expr_with_expectation
32: rustc_typeck::check::fn_ctxt::checks::::check_argument_types
33: rustc_typeck::check::callee::::confirm_builtin_call
34: rustc_typeck::check::callee::::check_call
35: rustc_typeck::check::expr::::check_expr_kind
36: rustc_typeck::check::expr::::check_expr_with_expectation
37: rustc_typeck::check::fn_ctxt::checks::::check_stmt
38: rustc_typeck::check::fn_ctxt::checks::::check_block_with_expected
39: rustc_typeck::check::expr::::check_expr_with_expectation
40: rustc_typeck::check::fn_ctxt::checks::::check_stmt
41: rustc_typeck::check::fn_ctxt::checks::::check_block_with_expected
42: rustc_typeck::check::expr::::check_expr_with_expectation
43: rustc_typeck::check::_match::::check_match
44: rustc_typeck::check::expr::::check_expr_kind
45: rustc_typeck::check::expr::::check_expr_with_expectation
46: rustc_typeck::check::fn_ctxt::checks::::check_stmt
47: rustc_typeck::check::fn_ctxt::checks::::check_block_with_expected
48: rustc_typeck::check::expr::::check_expr_with_expectation
49: rustc_typeck::check::expr::::check_return_expr
50: rustc_typeck::check::check::check_fn
51: rustc_infer::infer::InferCtxtBuilder::enter
52: rustc_typeck::check::typeck
53: rustc_middle::dep_graph::::with_deps
54: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl
55: rustc_data_structures::stack::ensure_sufficient_stack
56: rustc_query_system::query::plumbing::force_query_with_job
57: rustc_query_system::query::plumbing::get_query_impl
58: ::typeck
59: rustc_middle::ty::::par_body_owners
60: rustc_typeck::check::typeck_item_bodies
61: rustc_middle::dep_graph::::with_deps
62: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl
63: rustc_data_structures::stack::ensure_sufficient_stack
64: rustc_query_system::query::plumbing::force_query_with_job
65: rustc_query_system::query::plumbing::get_query_impl
66: ::typeck_item_bodies
67: rustc_session::utils::::time
68: rustc_typeck::check_crate
69: rustc_interface::passes::analysis
70: rustc_middle::dep_graph::::with_deps
71: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl
72: rustc_data_structures::stack::ensure_sufficient_stack
73: rustc_query_system::query::plumbing::force_query_with_job
74: rustc_query_system::query::plumbing::get_query_impl
75: ::analysis
76: rustc_interface::passes::QueryContext::enter
77: rustc_interface::queries::::enter
78: rustc_span::with_source_map
79: rustc_interface::interface::create_compiler_and_run
80: scoped_tls::ScopedKey::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```