Skip to content

error when updating rustc #147

Closed
@ehuss

Description

@ehuss

I'm trying to update rust-lang/rust to the latest smallvec (0.6.7 ➙ 0.6.9), and an running into an issue where rustc fails to compile:

error: internal compiler error: src/librustc/ty/relate.rs:773: impossible case reached: can't relate: '_#0r with Type(RustaceansAreAwesome)

I have narrowed down the change that breaks this to #137.

I don't know anything about smallvec and very little about rustc, so if anyone can help figure out what's wrong, I'd appreciate it. I'll keep digging a little, but it is unlikely that I'll be able to do more. This can be reproduced with cargo update -p smallvec; ./x.py build (on master, 021a5033098ff0e3f7126acc7ac35149d325f16d).

backtrace
thread 'rustc' panicked at 'Box', src/librustc_errors/lib.rs:637:9
stack backtrace:
   0: std::sys_common::backtrace::print
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::default_hook
   3: rustc::util::common::panic_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: rustc_errors::Handler::bug
   7: rustc::util::bug::opt_span_bug_fmt::{{closure}}
   8: rustc::ty::context::tls::with_opt::{{closure}}
   9: rustc::ty::context::tls::with_context_opt
  10: rustc::ty::context::tls::with_opt
  11: rustc::util::bug::opt_span_bug_fmt
  12: rustc::util::bug::bug_fmt
  13: ::relate
  14: <&mut I as core::iter::traits::iterator::Iterator>::next
  15:  as core::iter::traits::collect::FromIterator<::Item>>::from_iter
  16:  as rustc::ty::context::InternIteratorElement>::intern_with
  17: rustc::ty::relate::relate_substs
  18: ::relate
  19: rustc::infer::higher_ranked::::higher_ranked_sub
  20: rustc::infer::InferCtxt::commit_if_ok
  21: rustc::traits::select::SelectionContext::match_poly_trait_ref
  22: rustc::infer::InferCtxt::probe
  23: rustc::traits::select::SelectionContext::assemble_candidates
  24: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  25: rustc::dep_graph::graph::DepGraph::with_anon_task
  26: rustc::traits::select::SelectionContext::candidate_from_obligation
  27: rustc::traits::select::SelectionContext::evaluate_stack
  28: rustc::dep_graph::graph::DepGraph::with_anon_task
  29: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  30: rustc::traits::select::SelectionContext::evaluate_predicates_recursively
  31: rustc::infer::InferCtxt::probe
  32: rustc::traits::select::SelectionContext::evaluate_stack
  33: rustc::dep_graph::graph::DepGraph::with_anon_task
  34: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  35: rustc::infer::InferCtxt::probe
  36: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  37: rustc::ty::context::GlobalCtxt::enter_local
  38: rustc_traits::evaluate_obligation::evaluate_obligation
  39: rustc::ty::query::__query_compute::evaluate_obligation
  40: rustc::ty::query::::compute
  41: rustc::dep_graph::graph::DepGraph::with_task_impl
  42: rustc::ty::query::plumbing::::get_query
  43: rustc::traits::query::evaluate_obligation::::evaluate_obligation
  44: rustc::traits::query::evaluate_obligation::::evaluate_obligation_no_overflow
  45: rustc::ty::context::GlobalCtxt::enter_local
  46: rustc::traits::object_safety::::virtual_call_violation_for_method
  47:  as core::iter::traits::iterator::Iterator>::next
  48:  as alloc::vec::SpecExtend>::from_iter
  49: rustc::traits::object_safety::::object_safety_violations_for_trait
  50:  as core::iter::traits::iterator::Iterator>::next
  51:  as alloc::vec::SpecExtend>::from_iter
  52: rustc::traits::object_safety::is_object_safe_provider
  53: rustc::ty::query::::compute
  54: rustc::dep_graph::graph::DepGraph::with_task_impl
  55: rustc::ty::query::plumbing::::get_query
  56: rustc_data_structures::obligation_forest::ObligationForest::process_obligations
  57: ::select_where_possible
  58: ::select_all_or_error
  59: rustc_typeck::check::FnCtxt::select_all_obligations_or_error
  60: rustc::ty::context::GlobalCtxt::enter_local
  61: rustc_typeck::check::wfcheck::check_item_well_formed
  62: rustc::ty::query::__query_compute::check_item_well_formed
  63: rustc::ty::query::::compute
  64: rustc::dep_graph::graph::DepGraph::with_task_impl
  65: rustc::ty::query::plumbing::::get_query
  66: ::visit_item
  67: __rust_maybe_catch_panic
  68: rustc_data_structures::sync::par_for_each_in
  69: __rust_maybe_catch_panic
  70: rustc::hir::Crate::par_visit_all_item_likes
  71: rustc::util::common::time
  72: rustc_typeck::check_crate
  73: rustc_interface::passes::analysis
  74: rustc::ty::query::__query_compute::analysis
  75: rustc::dep_graph::graph::DepGraph::with_task_impl
  76: rustc::ty::query::plumbing::::get_query
  77: rustc::ty::context::tls::enter_global
  78: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  79: rustc_interface::passes::create_global_ctxt::{{closure}}
  80: rustc_interface::interface::run_compiler_in_existing_thread_pool
  81: std::thread::local::LocalKey::with
  82: scoped_tls::ScopedKey::set
  83: syntax::with_globals

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions