Skip to content

ty_is_local invoked on unexpected type: [type error] #31311

Closed

Description

@nagisa

Compiling this branch: https://github.com/nagisa/rust/tree/rustc-ice

rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_trans
src/librustc_trans/trans/mir/analyze.rs:145:30: 145:41 error: use of undeclared type name `DropAnalyze` [E0412]
src/librustc_trans/trans/mir/analyze.rs:145 impl<'tcx> Visitor<'tcx> for DropAnalyze {
                                                                         ^~~~~~~~~~~
src/librustc_trans/trans/mir/analyze.rs:145:30: 145:41 help: run `rustc --explain E0412` to see a detailed explanation
error: internal compiler error: ty_is_local invoked on unexpected type: [type error]
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', ../src/libsyntax/errors/mod.rs:230

Once typo is fixed (s/DropAnalyze/DropAnalyzer/), the code compiles fine (i.e. there’s no other errors)

Activity

  1. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Jan 30, 2016
  2. arielb1 commented on Jan 31, 2016

    @arielb1
    Contributor

    can't reproduce. could you provide a backtrace?

  3. nagisa commented on Jan 31, 2016

    @nagisa
    MemberAuthor

    Sorry, completely forgot about providing a backtrace.

    stack backtrace:
       1:     0x555e2d41dd70 - sys::backtrace::tracing::imp::write::hf017a53caeea9181K0t
       2:     0x555e2d422d15 - panicking::log_panic::_<closure>::closure.41445
       3:     0x555e2d4227d7 - panicking::log_panic::h1721f4958b0153faY7x
       4:     0x555e2d4056e3 - sys_common::unwind::begin_unwind_inner::hceb53b2cdeb63b0ajTs
       5:     0x555e2d1797d7 - sys_common::unwind::begin_unwind::begin_unwind::h8702540759513209410
       6:     0x555e2d1799b4 - errors::Handler::bug::h596e91013ba395d3AZc
       7:     0x555e2be38efc - session::Session::bug::h4287060760826713mLr
       8:     0x555e2bf9a116 - middle::traits::coherence::ty_is_local_constructor::hcb9781ef105b4c51deT
       9:     0x555e2bf993ab - middle::traits::coherence::ty_is_local::h44a33c4aa00b2a11XcT
      10:     0x555e2bf979bc - middle::traits::coherence::orphan_check_trait_ref::h0075a05a4454a1f6B3S
      11:     0x555e2bf992ef - middle::traits::coherence::orphan_check::ha7120e3f654aa863iZS
      12:     0x555e2b929540 - coherence::orphan::OrphanChecker<'cx, 'tcx>.intravisit..Visitor<'v>::visit_item::h288fc85d45b3819eK6A
      13:     0x555e2b7e0db5 - coherence::check_coherence::h6a2cd04514b79e01raC
      14:     0x555e2b7d9be7 - check_crate::h3cba37cadfcc2d65dFD
      15:     0x555e2b65d588 - driver::phase_3_run_analysis_passes::_<closure>::closure.25745
      16:     0x555e2b63ffb5 - middle::ty::context::ctxt<'tcx>::create_and_enter::create_and_enter::h5563987744098407412
      17:     0x555e2b63b8d1 - driver::phase_3_run_analysis_passes::h15227196103201629072
      18:     0x555e2b610569 - driver::compile_input::h8b92c3e1d5e7c1b1jca
      19:     0x555e2b60277b - run_compiler::hb2fb2dc8aadcbe345wc
      20:     0x555e2b5ff536 - sys_common::unwind::try::try_fn::try_fn::h12384702373597705490
      21:     0x555e2d41d218 - __rust_try
      22:     0x555e2d41847b - sys_common::unwind::try::inner_try::h95ceacb411385b64RPs
      23:     0x555e2b5ff890 - boxed::F.FnBox<A>::call_box::call_box::h15731941968204426205
      24:     0x555e2d421683 - sys::thread::Thread::new::thread_start::hf71a3c2717797118bax
      25:     0x7f5cb96114a3 - start_thread
      26:     0x7f5cb8a2f13c - clone
      27:                0x0 - <unknown>
    
  4. arielb1 commented on Jan 31, 2016

    @arielb1
    Contributor

    This should be fixed in nightly. Can you provide a case?

  5. nagisa commented on Jan 31, 2016

    @nagisa
    MemberAuthor

    @arielb1 ah, might be, since this happens when compiling the stage1 rustc (and stage0 is pretty old). My only “case” is rustc itself with a typo (branch linked in the first message).

  6. sanxiyn commented on Mar 17, 2016

    @sanxiyn
    Contributor

    Backtrace suggests this is the same bug fixed by #30676.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions