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 in nightly with assertion failed: !value.has_escaping_bound_vars() #89333

Closed
13ros27 opened this issue Sep 28, 2021 · 6 comments · Fixed by #89345
Closed

ICE in nightly with assertion failed: !value.has_escaping_bound_vars() #89333

13ros27 opened this issue Sep 28, 2021 · 6 comments · Fixed by #89345
Assignees
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.
Milestone

Comments

@13ros27
Copy link

13ros27 commented Sep 28, 2021

Code

fn main() {
    test(&|| 0);
}

fn test<T>(arg: &impl Fn() -> T) where for<'a> &'a T: Default {}

When creating this I found that it did not error if the function was not called and it also seemed to require it to be a function not just an argument of type T or (from what I tested) a different impl Trait although it could be any Fn* trait
Playground Link

Meta

rustc --version --verbose:

rustc 1.57.0-nightly (5ecc8ad84 2021-09-19)
binary: rustc
commit-hash: 5ecc8ad8462574354a55162a0c16b10eb95e3e70
commit-date: 2021-09-19
host: x86_64-unknown-linux-gnu
release: 1.57.0-nightly
LLVM version: 13.0.0

This appears to only happen on nightly while stable and beta generate useful error reports

Error output

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', compiler/rustc_middle/src/ty/sty.rs:971:9                                                                   
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace                                                                                                                

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.57.0-nightly (5ecc8ad84 2021-09-19) running on x86_64-unknown-linux-gnu
                                                                                                                                                                                             
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib

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

query stack during panic:
#0 [typeck] type-checking `main`                                                                                                                                                             
#1 [typeck] type-checking `main::{closure#0}`
end of query stack
error: internal compiler error: trimmed_def_paths constructed                                                                                                                                
  |
  = note: delayed at    0: rustc_errors::Handler::delay_good_path_bug
             1: rustc_middle::ty::print::pretty::trimmed_def_paths
             2: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
             3: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
             4: rustc_data_structures::stack::ensure_sufficient_stack
             5: rustc_query_system::query::plumbing::try_execute_query
             6: rustc_query_system::query::plumbing::get_query
             7: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
             8: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
             9: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::TraitPredicate>::print
            10: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::PredicateKind>::print
            11: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::pretty::PrettyPrinter>::in_binder
            12: rustc_middle::ty::print::pretty::<impl core::fmt::Display for rustc_middle::ty::Predicate>::fmt
            13: core::fmt::write
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/fmt/mod.rs:1126:17
            14: core::fmt::Write::write_fmt
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/fmt/mod.rs:186:9
            15: alloc::fmt::format
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/fmt.rs:583:5
            16: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
            17: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
            18: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
            19: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
            20: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
            21: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
            22: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            23: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            24: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            25: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
            26: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
            27: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            28: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            29: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
            30: rustc_typeck::check::check::check_fn
            31: rustc_infer::infer::InferCtxtBuilder::enter
            32: rustc_typeck::check::typeck
            33: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
            34: rustc_data_structures::stack::ensure_sufficient_stack
            35: rustc_query_system::query::plumbing::try_execute_query
            36: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
            37: rustc_typeck::check::typeck
            38: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
            39: rustc_data_structures::stack::ensure_sufficient_stack
            40: rustc_query_system::query::plumbing::try_execute_query
            41: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
            42: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
            43: rustc_typeck::check::typeck_item_bodies
            44: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
            45: rustc_data_structures::stack::ensure_sufficient_stack
            46: rustc_query_system::query::plumbing::try_execute_query
            47: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies
            48: rustc_session::utils::<impl rustc_session::session::Session>::time
            49: rustc_typeck::check_crate
            50: rustc_interface::passes::analysis
            51: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
            52: rustc_data_structures::stack::ensure_sufficient_stack
            53: rustc_query_system::query::plumbing::try_execute_query
            54: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
            55: rustc_interface::passes::QueryContext::enter
            56: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
            57: rustc_span::with_source_map
            58: scoped_tls::ScopedKey<T>::set
            59: std::sys_common::backtrace::__rust_begin_short_backtrace
            60: core::ops::function::FnOnce::call_once{{vtable.shim}}
            61: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/boxed.rs:1636:9
            62: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/boxed.rs:1636:9
            63: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys/unix/thread.rs:106:17
            64: start_thread
                       at /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
            65: clone
          

thread 'rustc' panicked at 'no warnings or errors encountered even though `delayed_good_path_bugs` issued', compiler/rustc_errors/src/lib.rs:1165:13
stack backtrace:
   0:     0x7fd264b8651c - std::backtrace_rs::backtrace::libunwind::trace::h2ab374bc2a3b7023
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7fd264b8651c - std::backtrace_rs::backtrace::trace_unsynchronized::h128cb5178b04dc46
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fd264b8651c - std::sys_common::backtrace::_print_fmt::h5344f9eefca2041f
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fd264b8651c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h213003bc5c7acf04
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7fd264be47dc - core::fmt::write::h78bf85fc3e93663f
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/fmt/mod.rs:1126:17
   5:     0x7fd264b77405 - std::io::Write::write_fmt::he619515c888f21a5
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/io/mod.rs:1667:15
   6:     0x7fd264b89a80 - std::sys_common::backtrace::_print::hf706674f77848203
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7fd264b89a80 - std::sys_common::backtrace::print::hf0b6c7a88804ec56
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7fd264b89a80 - std::panicking::default_hook::{{closure}}::h2dde766cd83a333a
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:210:50
   9:     0x7fd264b89637 - std::panicking::default_hook::h501e3b2e134eb149
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:227:9
  10:     0x7fd265368d61 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::h130eb86a150311ba
  11:     0x7fd264b8a299 - std::panicking::rust_panic_with_hook::hc09e869c4cf00885                                                                                                           
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:628:17
  12:     0x7fd264b89d50 - std::panicking::begin_panic_handler::{{closure}}::hc2c6d70142458fc8
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:521:13
  13:     0x7fd264b869c4 - std::sys_common::backtrace::__rust_end_short_backtrace::had58f7c459a1cd6e
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:141:18
  14:     0x7fd264b89cb9 - rust_begin_unwind
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:517:5
  15:     0x7fd264b4f861 - core::panicking::panic_fmt::hf443e5eeb6cc9eab
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/panicking.rs:103:14
  16:     0x7fd26640fb4c - core::panicking::panic_display::h5ba672e923a99f9b
  17:     0x7fd26795eb06 - rustc_errors::HandlerInner::flush_delayed::hda43028f3d86869a
  18:     0x7fd26795d431 - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::h3a674f7627bd81be
  19:     0x7fd266f2a398 - core::ptr::drop_in_place<rustc_session::parse::ParseSess>::h22aba6261238fc42                                                                                      
  20:     0x7fd266f2c22f - <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop::h26b48b4a343c4b6d
  21:     0x7fd266efe7cd - core::ptr::drop_in_place<rustc_interface::interface::Compiler>::h1db16aa1df7f112d                                                                                 
  22:     0x7fd266efe4ac - rustc_span::with_source_map::h43cbd8428809207d                                                                                                                    
  23:     0x7fd266f10438 - scoped_tls::ScopedKey<T>::set::h3d900268035b2b22
  24:     0x7fd266eff05a - std::sys_common::backtrace::__rust_begin_short_backtrace::hb43f082e4793abcc
  25:     0x7fd266efc8c5 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hbb1067ee904c2726
  26:     0x7fd264b96e33 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h59eef3b9c8a82350
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/boxed.rs:1636:9
  27:     0x7fd264b96e33 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb5bbe017c347469c
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/boxed.rs:1636:9
  28:     0x7fd264b96e33 - std::sys::unix::thread::Thread::new::thread_start::h62931528f61e35f5
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys/unix/thread.rs:106:17
  29:     0x7fd264ab5609 - start_thread
                               at /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
  30:     0x7fd2649c9293 - clone
  31:                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.57.0-nightly (5ecc8ad84 2021-09-19) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
error: could not compile `ice-lib-test`                                                                                                                                                      

Caused by:
  process didn't exit successfully: `rustc --crate-name ice_lib_test --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=68eae1534bd49a91 -C extra-filename=-68eae1534bd49a91 --out-dir /home/myname/Documents/Programming/Rust/ice-lib-test/target/debug/deps -C incremental=/home/myname/Documents/Programming/Rust/ice-lib-test/target/debug/incremental -L dependency=/home/myname/Documents/Programming/Rust/ice-lib-test/target/debug/deps` (signal: 4, SIGILL: illegal instruction)
Backtrace

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', compiler/rustc_middle/src/ty/sty.rs:971:9                                                                   
stack backtrace:                                                                                                                                                                             
   0: rust_begin_unwind                                                                                                                                                                      
             at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/panicking.rs:103:14
   2: core::panicking::panic
             at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/panicking.rs:50:5
   3: <rustc_middle::ty::ConstnessAnd<rustc_middle::ty::sty::TraitRef> as rustc_middle::ty::ToPredicate>::to_predicate
   4: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::suggestions::InferCtxtExt>::suggest_add_reference_to_arg::{{closure}}                                
   5: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::suggestions::InferCtxtExt>::suggest_add_reference_to_arg
   6: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
   7: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
   8: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
   9: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types                                                                                
  10: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  11: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call                                                                                                   
  12: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind                                                                                                
  13: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args                                                                           
  14: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation                                                                                    
  15: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt                                                                                          
  16: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
  17: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args                                                                           
  18: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  19: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr                                                                                              
  20: rustc_typeck::check::check::check_fn                                                                                                                                                   
  21: rustc_infer::infer::InferCtxtBuilder::enter
  22: rustc_typeck::check::typeck                                                                                                                                                            
  23: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task                                                                                                                           
  24: rustc_data_structures::stack::ensure_sufficient_stack                                                                                                                                  
  25: rustc_query_system::query::plumbing::try_execute_query                                                                                                                                 
  26: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck                                                                                                            
  27: rustc_typeck::check::typeck
  28: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  29: rustc_data_structures::stack::ensure_sufficient_stack                                                                                                                                  
  30: rustc_query_system::query::plumbing::try_execute_query
  31: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck                                                                                                            
  32: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
  33: rustc_typeck::check::typeck_item_bodies
  34: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  35: rustc_data_structures::stack::ensure_sufficient_stack
  36: rustc_query_system::query::plumbing::try_execute_query                                                                                                                                 
  37: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies
  38: rustc_session::utils::<impl rustc_session::session::Session>::time
  39: rustc_typeck::check_crate
  40: rustc_interface::passes::analysis
  41: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  42: rustc_data_structures::stack::ensure_sufficient_stack
  43: rustc_query_system::query::plumbing::try_execute_query
  44: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  45: rustc_interface::passes::QueryContext::enter                                                                                                                                           
  46: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  47: rustc_span::with_source_map                                                                                                                                                            
  48: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.57.0-nightly (5ecc8ad84 2021-09-19) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [typeck] type-checking `main`                                                                                                                                                             
#1 [typeck] type-checking `main::{closure#0}`                                                                                                                                                
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
error: internal compiler error: trimmed_def_paths constructed                                                                                                                                
  |
  = note: delayed at    0: rustc_errors::Handler::delay_good_path_bug
             1: rustc_middle::ty::print::pretty::trimmed_def_paths
             2: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
             3: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
             4: rustc_data_structures::stack::ensure_sufficient_stack
             5: rustc_query_system::query::plumbing::try_execute_query
             6: rustc_query_system::query::plumbing::get_query
             7: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
             8: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
             9: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::TraitPredicate>::print
            10: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::PredicateKind>::print
            11: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::pretty::PrettyPrinter>::in_binder
            12: rustc_middle::ty::print::pretty::<impl core::fmt::Display for rustc_middle::ty::Predicate>::fmt
            13: core::fmt::write
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/fmt/mod.rs:1126:17
            14: core::fmt::Write::write_fmt
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/fmt/mod.rs:186:9
            15: alloc::fmt::format
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/fmt.rs:583:5
            16: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
            17: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
            18: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
            19: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
            20: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
            21: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
            22: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            23: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            24: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            25: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
            26: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
            27: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            28: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            29: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
            30: rustc_typeck::check::check::check_fn
            31: rustc_infer::infer::InferCtxtBuilder::enter
            32: rustc_typeck::check::typeck
            33: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
            34: rustc_data_structures::stack::ensure_sufficient_stack
            35: rustc_query_system::query::plumbing::try_execute_query
            36: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
            37: rustc_typeck::check::typeck
            38: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
            39: rustc_data_structures::stack::ensure_sufficient_stack
            40: rustc_query_system::query::plumbing::try_execute_query
            41: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
            42: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
            43: rustc_typeck::check::typeck_item_bodies
            44: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
            45: rustc_data_structures::stack::ensure_sufficient_stack
            46: rustc_query_system::query::plumbing::try_execute_query
            47: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies
            48: rustc_session::utils::<impl rustc_session::session::Session>::time
            49: rustc_typeck::check_crate
            50: rustc_interface::passes::analysis
            51: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
            52: rustc_data_structures::stack::ensure_sufficient_stack
            53: rustc_query_system::query::plumbing::try_execute_query
            54: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
            55: rustc_interface::passes::QueryContext::enter
            56: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
            57: rustc_span::with_source_map
            58: scoped_tls::ScopedKey<T>::set
            59: std::sys_common::backtrace::__rust_begin_short_backtrace
            60: core::ops::function::FnOnce::call_once{{vtable.shim}}
            61: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/boxed.rs:1636:9
            62: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/boxed.rs:1636:9
            63: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys/unix/thread.rs:106:17
            64: start_thread
                       at /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
            65: clone
          

thread 'rustc' panicked at 'no warnings or errors encountered even though `delayed_good_path_bugs` issued', compiler/rustc_errors/src/lib.rs:1165:13
stack backtrace:
   0:     0x7f917418b51c - std::backtrace_rs::backtrace::libunwind::trace::h2ab374bc2a3b7023
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7f917418b51c - std::backtrace_rs::backtrace::trace_unsynchronized::h128cb5178b04dc46
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f917418b51c - std::sys_common::backtrace::_print_fmt::h5344f9eefca2041f
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f917418b51c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h213003bc5c7acf04
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7f91741e97dc - core::fmt::write::h78bf85fc3e93663f
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/fmt/mod.rs:1126:17
   5:     0x7f917417c405 - std::io::Write::write_fmt::he619515c888f21a5
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/io/mod.rs:1667:15
   6:     0x7f917418ea80 - std::sys_common::backtrace::_print::hf706674f77848203
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7f917418ea80 - std::sys_common::backtrace::print::hf0b6c7a88804ec56
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7f917418ea80 - std::panicking::default_hook::{{closure}}::h2dde766cd83a333a
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:210:50
   9:     0x7f917418e637 - std::panicking::default_hook::h501e3b2e134eb149
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:227:9
  10:     0x7f917496dd61 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::h130eb86a150311ba
  11:     0x7f917418f299 - std::panicking::rust_panic_with_hook::hc09e869c4cf00885
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:628:17
  12:     0x7f917418ed50 - std::panicking::begin_panic_handler::{{closure}}::hc2c6d70142458fc8
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:521:13
  13:     0x7f917418b9c4 - std::sys_common::backtrace::__rust_end_short_backtrace::had58f7c459a1cd6e
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys_common/backtrace.rs:141:18
  14:     0x7f917418ecb9 - rust_begin_unwind
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:517:5
  15:     0x7f9174154861 - core::panicking::panic_fmt::hf443e5eeb6cc9eab
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/panicking.rs:103:14
  16:     0x7f9175a14b4c - core::panicking::panic_display::h5ba672e923a99f9b
  17:     0x7f9176f63b06 - rustc_errors::HandlerInner::flush_delayed::hda43028f3d86869a
  18:     0x7f9176f62431 - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::h3a674f7627bd81be
  19:     0x7f917652f398 - core::ptr::drop_in_place<rustc_session::parse::ParseSess>::h22aba6261238fc42
  20:     0x7f917653122f - <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop::h26b48b4a343c4b6d
  21:     0x7f91765037cd - core::ptr::drop_in_place<rustc_interface::interface::Compiler>::h1db16aa1df7f112d
  22:     0x7f91765034ac - rustc_span::with_source_map::h43cbd8428809207d
  23:     0x7f9176515438 - scoped_tls::ScopedKey<T>::set::h3d900268035b2b22                                                                                                                  
  24:     0x7f917650405a - std::sys_common::backtrace::__rust_begin_short_backtrace::hb43f082e4793abcc
  25:     0x7f91765018c5 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hbb1067ee904c2726
  26:     0x7f917419be33 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h59eef3b9c8a82350
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/boxed.rs:1636:9
  27:     0x7f917419be33 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb5bbe017c347469c
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/alloc/src/boxed.rs:1636:9
  28:     0x7f917419be33 - std::sys::unix::thread::Thread::new::thread_start::h62931528f61e35f5
                               at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/sys/unix/thread.rs:106:17
  29:     0x7f91740ba609 - start_thread
                               at /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
  30:     0x7f9173fce293 - clone
  31:                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.57.0-nightly (5ecc8ad84 2021-09-19) running on x86_64-unknown-linux-gnu

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

note: some of the compiler flags provided by cargo are hidden
                                                                                                                                                                                             
query stack during panic:
end of query stack
thread panicked while panicking. aborting.
error: could not compile `ice-lib-test`                                                                                                                                                      

Caused by:
  process didn't exit successfully: `rustc --crate-name ice_lib_test --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=8123560056bfddf7 -C extra-filename=-8123560056bfddf7 --out-dir /home/myname/Documents/Programming/Rust/ice-lib-test/target/debug/deps -C incremental=/home/myname/Documents/Programming/Rust/ice-lib-test/target/debug/incremental -L dependency=/home/myname/Documents/Programming/Rust/ice-lib-test/target/debug/deps` (signal: 4, SIGILL: illegal instruction)

@13ros27 13ros27 added C-bug Category: This is a bug. 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. labels Sep 28, 2021
@SNCPlay42
Copy link
Contributor

@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 Sep 28, 2021
@13ros27
Copy link
Author

13ros27 commented Sep 28, 2021

nightly-2021-09-17 does not ICE but errors correctly while nightly-2021-09-18 does ICE

@camelid camelid added this to the 1.57.0 milestone Sep 28, 2021
@camelid
Copy link
Member

camelid commented Sep 28, 2021

rustbot added a commit to rustbot/glacier that referenced this issue Sep 28, 2021
@camelid
Copy link
Member

camelid commented Sep 28, 2021

searched nightlies: from nightly-2021-09-17 to nightly-2021-09-18
regressed nightly: nightly-2021-09-18
searched commits: from e4828d5 to 9dd4ce8
regressed commit: e366210

bisected with cargo-bisect-rustc v0.6.0

Host triple: x86_64-apple-darwin
Reproduce with:

cargo bisect-rustc --regress=ice --start=2021-09-17 --end=2021-09-18 

That's #88719, so cc @estebank.

@jackh726
Copy link
Member

I've got this. @rustbot claim

Interestingly, this is precisely the kind of thing that #89001 is hopefully going to help harden against: "hidden" Binder::dummys when calling to_predicate and such

JohnTitor pushed a commit to rust-lang/glacier that referenced this issue Sep 29, 2021
Co-authored-by: rustbot <47979223+rustbot@users.noreply.github.com>
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Sep 29, 2021
@apiraino
Copy link
Contributor

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-medium

@rustbot rustbot added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Sep 30, 2021
ehuss added a commit to ehuss/rust that referenced this issue Sep 30, 2021
Don't lose binders when printing trait bound suggestion

Fixes rust-lang#89333
@bors bors closed this as completed in 2801a77 Oct 3, 2021
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.

7 participants