Skip to content

task 'rustc' failed at 'assertion failed: ty::type_is_sized(bcx.tcx(), contents_ty)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/trans/expr.rs:1503 #17118

Closed
@glademiller

Description

@glademiller

I have a function defined like this which I suspect is not working because I'm doing it wrong but rustc isn't being very helpful.

fn get_page(uri: &str) -> Box<str> {
....
box *body.as_slice()
}
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'assertion failed: ty::type_is_sized(bcx.tcx(), contents_ty)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/trans/expr.rs:1503

stack backtrace:
   1:        0x10f052115 - rt::backtrace::imp::write::h38c3950ca30819fdNhr
   2:        0x10f055451 - failure::on_fail::h61277a1f47996a75Hyr
   3:        0x10f307875 - unwind::begin_unwind_inner::h486b778488114bbbb0d
   4:        0x10ba0cd3f - unwind::begin_unwind::h15688615720603158913
   5:        0x10be1d27f - middle::trans::expr::trans_uniq_expr::h40fb1130cbca349eit5
   6:        0x10be1dea3 - middle::trans::expr::trans_unary::hfc200761698d9538dp5
   7:        0x10be11d3c - middle::trans::expr::trans_unadjusted::h82416de87d2e89c4t73
   8:        0x10bdceffb - middle::trans::expr::trans_into::ha853a39b9a7f24dajk3
   9:        0x10bdcf264 - middle::trans::controlflow::trans_block::hd755847507381b83M8Y
  10:        0x10be7ee66 - middle::trans::base::trans_closure::h0c688b38a6dcca51gSf
  11:        0x10bdbf322 - middle::trans::base::trans_fn::h097de052d534817a33f
  12:        0x10bdbabf3 - middle::trans::base::trans_item::h7c651a6b253c43b1Sng
  13:        0x10be8977c - middle::trans::base::trans_crate::h8a752ffbd6768478rnh
  14:        0x10c2a8241 - driver::driver::phase_4_translate_to_llvm::hff28f92720c498desQD
  15:        0x10c2a11e8 - driver::driver::compile_input::h6fd531f77f6169fctsD
  16:        0x10c32bfaa - driver::run_compiler::hb663589ebabe2c20IjH
  17:        0x10c32a3b6 - driver::main_args::closure.147451
  18:        0x10ba42d6b - task::TaskBuilder<S>::try_future::closure.100018
  19:        0x10ba42c73 - task::TaskBuilder<S>::spawn_internal::closure.99989
  20:        0x10d6de2cd - task::spawn_opts::closure.8473
  21:        0x10f369d2c - rust_try_inner
  22:        0x10f369d16 - rust_try
  23:        0x10f304d17 - unwind::try::h513c5138bad9ea23lOd
  24:        0x10f304b8c - task::Task::run::h87d8d159864e6bc2L0c
  25:        0x10d6de122 - task::spawn_opts::closure.8412
  26:        0x10f3067ba - thread::thread_start::hb27c396f8741958eSld
  27:     0x7fff9337d899 - _pthread_body
  28:     0x7fff9337d72a - _pthread_struct_init

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)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