Skip to content

ICE: Unexpected tail in unsized_info_ty #34182

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

Closed
jonhoo opened this issue Jun 9, 2016 · 1 comment
Closed

ICE: Unexpected tail in unsized_info_ty #34182

jonhoo opened this issue Jun 9, 2016 · 1 comment

Comments

@jonhoo
Copy link
Contributor

jonhoo commented Jun 9, 2016

The following code causes a compiler panic:

pub trait A<T> {}

pub enum C<T> {
    A(A<T>),
}

fn main() {
    let _: Option<Box<C<&str>>> = None;
}
$ rustup run nightly rustc x.rs
error: internal compiler error: ../src/librustc_trans/type_of.rs:178: Unexpected tail in unsized_info_ty: C<&str> for ty=C<&str>
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:584
stack backtrace:
   1:     0x7f547094161f - std::sys::backtrace::tracing::imp::write::h6528da8103c51ab9
   2:     0x7f547094f20b - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hbe741a5cc3c49508
   3:     0x7f547094eda8 - std::panicking::default_hook::he0146e6a74621cb4
   4:     0x7f547091516e - std::panicking::rust_panic_with_hook::h983af77c1a2e581b
   5:     0x7f546bc19e07 - std::panicking::begin_panic::hf9f206df23a555af
   6:     0x7f546bc1976e - syntax::errors::Handler::bug::hd25802f012f6858b
   7:     0x7f546ce8d854 - rustc::session::opt_span_bug_fmt::_$u7b$$u7b$closure$u7d$$u7d$::h083e19915ee66466
   8:     0x7f546ce8d65d - rustc::session::opt_span_bug_fmt::h157ddeb5b4622d22
   9:     0x7f546cea8036 - rustc::session::bug_fmt::h166f9667daf4dd54
  10:     0x7f546e491493 - rustc_trans::type_of::unsized_info_ty::hf0d5468d19bde7c2
  11:     0x7f546e33d1fc - rustc_trans::type_of::sizing_type_of::hf1ac5f8b6f66decc
  12:     0x7f546e345829 - _<collections..vec..Vec<T> as core..iter..traits..FromIterator<T>>::from_iter::hbabd995607a71cd2
  13:     0x7f546e342f68 - rustc_trans::adt::mk_struct::h66b7982c2b9de54e
  14:     0x7f546e340134 - rustc_trans::adt::represent_type::h04b5e656cc36c330
  15:     0x7f546e3f662d - rustc_trans::consts::const_expr_unadjusted::h7fee3ce2f8dec095
  16:     0x7f546e3f2104 - rustc_trans::consts::const_expr::h89b51f911278b3c4
  17:     0x7f546e3f355e - rustc_trans::consts::get_const_expr_as_global::h6bfb11a3176d89fa
  18:     0x7f546e3c6d02 - rustc_trans::expr::trans::hae685ae3f283bfbf
  19:     0x7f546e35e65e - rustc_trans::base::init_local::hbbeb45fbf0b21a8a
  20:     0x7f546e37435b - rustc_trans::controlflow::trans_block::h7ec6b213337f773e
  21:     0x7f546e36f338 - rustc_trans::base::trans_closure::h9e96f7e9279dd729
  22:     0x7f546e374e83 - rustc_trans::base::trans_fn::ha453f4075c16fe7d
  23:     0x7f546e37f10e - rustc_trans::base::trans_item::hca2904a0eb6b2a6f
  24:     0x7f546e3977b3 - _<rustc_trans..base..TransItemsWithinModVisitor<'a, 'tcx> as rustc..hir..intravisit..Visitor<'v>>::visit_item::hc86f557d139a067e
  25:     0x7f546e3880e7 - rustc_trans::base::trans_crate::h999c47a06d45abea
  26:     0x7f5470e93eff - rustc_driver::driver::phase_4_translate_to_llvm::had910d0e745bc40f
  27:     0x7f5470e91d8d - rustc_driver::driver::compile_input::_$u7b$$u7b$closure$u7d$$u7d$::hf187cb470aad2bf2
  28:     0x7f5470e8e4ed - rustc_driver::driver::phase_3_run_analysis_passes::_$u7b$$u7b$closure$u7d$$u7d$::hd565ad56c5876a16
  29:     0x7f5470e87cb9 - rustc::ty::context::TyCtxt::create_and_enter::habef58c7230d34f9
  30:     0x7f5470e510af - rustc_driver::driver::compile_input::hfd60b020f6d0208d
  31:     0x7f5470e3d0a4 - rustc_driver::run_compiler::h884d01d12eb76bbb
  32:     0x7f5470e3a17e - std::panicking::try::call::hd72cf79141f67e60
  33:     0x7f547095d6cb - __rust_try
  34:     0x7f547095d66e - __rust_maybe_catch_panic
  35:     0x7f5470e3ac64 - _<F as alloc..boxed..FnBox<A>>::call_box::h589d2091babf223a
  36:     0x7f547094d334 - std::sys::thread::Thread::new::thread_start::h9c883b6d445ece46
  37:     0x7f546839f473 - start_thread
  38:     0x7f547059c69c - clone
  39:                0x0 - <unknown>

Meta

$ rustup run nightly rustc --version --verbose
rustc 1.11.0-nightly (ec872dc8a 2016-06-07)
binary: rustc
commit-hash: ec872dc8a3f008299ca1508105ee064d1f0f0367
commit-date: 2016-06-07
host: x86_64-unknown-linux-gnu
release: 1.11.0-nightly
@apasel422
Copy link
Contributor

Duplicate of #32765.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants