Skip to content

ICE path not fully resolved, associated constants #26797

Closed
@dimbleby

Description

@dimbleby

Implementing my own fd_set because, per #26794, I can't find one exported elsewhere. But trying to be clever about the size of the required array causes a panic:

extern crate libc;

pub struct fd_set {
    pub __fds_bits: [libc::c_long ; (1024 / usize::BITS)],
}

fn main () {
}

Causes the following output:

error: internal compiler error: unexpected panic
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
thread 'rustc' panicked at 'path not fully resolved: PathResolution { base_def: DefPrimTy(TyUint(usize)), last_private: LastMod(AllPublic), depth: 1 }', ../src/librustc/middle/def.rs:81

stack backtrace:
   1:     0x7fc464f645ee - sys::backtrace::write::h04a6ced565b26815Lqs
   2:     0x7fc464f6c214 - panicking::on_panic::h521f84b604e22dfel8w
   3:     0x7fc464f2f04e - rt::unwind::begin_unwind_inner::hd3dee614a0e1c16cZNw
   4:     0x7fc464f2fd7c - rt::unwind::begin_unwind_fmt::ha4ce6704c81423045Mw
   5:     0x7fc462f5c059 - middle::const_eval::eval_const_expr_with_substs::h5244545712744191145
   6:     0x7fc462f5a532 - middle::const_eval::eval_const_expr_with_substs::h5244545712744191145
   7:     0x7fc462f5a8e3 - middle::const_eval::eval_const_expr_with_substs::h5244545712744191145
   8:     0x7fc462f0d04b - middle::const_eval::eval_const_expr_partial::h2b23a01d787e9d5efLk
   9:     0x7fc464740802 - astconv::ast_ty_to_ty::hb2c49d2cf31c029bYUv
  10:     0x7fc4647bcaa3 - iter::Map<I, F>.Iterator::next::h1378750426170396750
  11:     0x7fc4647b1ad8 - collect::convert_struct::h6351cd87dbfb23b7u5x
  12:     0x7fc4647a3080 - collect::convert_item::h502c0d9543ddcc68AKx
  13:     0x7fc46479e467 - collect::collect_item_types::hbd4ad720377bedf8RRw
  14:     0x7fc4647ec15b - check_crate::h594ee0148d251222uZC
  15:     0x7fc4654c4c69 - driver::phase_3_run_analysis_passes::closure.15783
  16:     0x7fc4654c3633 - middle::ty::ctxt<'tcx>::create_and_enter::h349256048753845929
  17:     0x7fc4654bea17 - driver::phase_3_run_analysis_passes::h15521018079403107052
  18:     0x7fc4654a1266 - driver::compile_input::hbf698b02349f7ce3Tba
  19:     0x7fc46557aed3 - run_compiler::hd724b5fef3441688y7b
  20:     0x7fc4655788ae - boxed::F.FnBox<A>::call_box::h6609070342514802751
  21:     0x7fc4655780f9 - rt::unwind::try::try_fn::h10774555836369096370
  22:     0x7fc464fe5d48 - rust_try_inner
  23:     0x7fc464fe5d35 - rust_try
  24:     0x7fc464f578a7 - rt::unwind::try::inner_try::hb0d7a3eb324339ceSJw
  25:     0x7fc46557830b - boxed::F.FnBox<A>::call_box::h18179817771297192954
  26:     0x7fc464f6ae71 - sys::thread::Thread::new::thread_start::hf8c7448e27294ed0PTv
  27:     0x7fc45eb9c529 - start_thread
  28:     0x7fc464bc322c - __clone
  29:                0x0 - <unknown>

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