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

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

Closed
nagisa opened this issue Jan 30, 2016 · 5 comments
Closed

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

nagisa opened this issue Jan 30, 2016 · 5 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nagisa
Copy link
Member

nagisa commented Jan 30, 2016

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)

@nagisa nagisa added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 30, 2016
@arielb1
Copy link
Contributor

arielb1 commented Jan 31, 2016

can't reproduce. could you provide a backtrace?

@nagisa
Copy link
Member Author

nagisa commented Jan 31, 2016

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>

@arielb1
Copy link
Contributor

arielb1 commented Jan 31, 2016

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

@nagisa
Copy link
Member Author

nagisa commented Jan 31, 2016

@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).

@sanxiyn
Copy link
Member

sanxiyn commented Mar 17, 2016

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

@sanxiyn sanxiyn closed this as completed Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants