Skip to content

error: internal compiler error: ../src/librustc_typeck/check/mod.rs:4396: unexpected definition: PrimTy(TyUint(u8)) #38188

@rohitjoshi

Description

@rohitjoshi

I declared a vector using vector macro as

 vec![u8]; 
 
instead of

vec![0u8];

I expected compiler to complain about the data type

Instead, It reported error

error: internal compiler error: ../src/librustc_typeck/check/mod.rs:4396: unexpected definition: PrimTy(TyUint(u8))

note: the compiler unexpectedly panicked. this is a bug.

Meta

rustc --version --verbose:

rustc --version --verbose
rustc 1.15.0-nightly (28d6623bc 2016-12-03)
binary: rustc
commit-hash: 28d6623bccf8f7e9a40a47895df75dd9ef2619da
commit-date: 2016-12-03
host: x86_64-apple-darwin
release: 1.15.0-nightly
LLVM version: 3.9

Backtrace:

thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:423
stack backtrace:
   1:        0x10d83d09a - std::sys::imp::backtrace::tracing::imp::write::hbea47d9dd19b523c
   2:        0x10d84a38f - std::panicking::default_hook::{{closure}}::h6875a2976258b020
   3:        0x10d849f3d - std::panicking::default_hook::h88ffbc5922643264
   4:        0x10d84a856 - std::panicking::rust_panic_with_hook::hc790e47d4ecc86cd
   5:        0x10d61483a - std::panicking::begin_panic::h264cdc75d51b518b
   6:        0x10d6274c4 - rustc_errors::Handler::bug::h620f7270292f0095
   7:        0x10a213c7c - rustc::session::opt_span_bug_fmt::{{closure}}::h4a9b70c3df8b4b3a
   8:        0x10a213a89 - rustc::session::opt_span_bug_fmt::h7d83586c6e2c7ae6
   9:        0x10a21360a - rustc::session::bug_fmt::he2d2f00a4afa9d1e
  10:        0x109a5878d - rustc_typeck::check::FnCtxt::instantiate_value_path::h4229ac945aebfa55
  11:        0x109a46c31 - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
  12:        0x109a4586d - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
13:        0x109a4ae0d - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
  14:        0x109a4586d - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
  15:        0x109a48fe4 - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
  16:        0x109a4586d - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
  17:        0x109a3b261 - rustc_typeck::check::FnCtxt::check_argument_types::he03b7446217ca4c2
  18:        0x109a18b11 - rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::confirm_builtin_call::hf6c4edce4
c70573d
  19:        0x109a1810d - rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::check_call::h762a25d0c9a1f5b4
  20:        0x109a469ab - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
  21:        0x109a4586d - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
  22:        0x109a56d27 - rustc_typeck::check::FnCtxt::check_decl_initializer::h43ea4d26b2a62ae8
  23:        0x109a56e2d - rustc_typeck::check::FnCtxt::check_decl_local::h15d42ee7f4d79e8d
  24:        0x109a5713f - rustc_typeck::check::FnCtxt::check_stmt::h155d968e61fdfae6
  25:        0x109a5746e - rustc_typeck::check::FnCtxt::check_block_with_expected::he90dd72b6855e5e4
  26:        0x109a3d2f0 - rustc_typeck::check::FnCtxt::check_then_else::h7ffb8604d0f0925d
  27:        0x109a460e1 - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
  28:        0x109a4586d - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
29:        0x109a574ae - rustc_typeck::check::FnCtxt::check_block_with_expected::he90dd72b6855e5e4
  30:        0x109a45d93 - rustc_typeck::check::FnCtxt::check_expr_kind::hfeeca7568cc99087
  31:        0x109a4586d - rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref::h5d7f5141d7386bb8
  32:        0x109a2c663 - rustc_typeck::check::check_fn::h96bd864b4d4fc711
  33:        0x109a2b1f7 - rustc_typeck::check::check_bare_fn::h87386ea43f4e272e
  34:        0x109a2e05c - rustc_typeck::check::check_item_body::h1e039ede2f960fb9
  35:        0x109a28dad - rustc_typeck::check::check_item_bodies::hd22adb7703cc56d7
  36:        0x109a969de - rustc_typeck::check_crate::h92f6bdfe03b6afba
  37:        0x1090426f0 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::hd97ec26bf3a98036
  38:        0x10902a6a4 - rustc_driver::driver::phase_3_run_analysis_passes::h6d446abb74c09795
  39:        0x10901ab0a - rustc_driver::driver::compile_input::h8e119234b60571d5
  40:        0x109061b5b - rustc_driver::run_compiler::h57c4f233cd1a0c04
  41:        0x108f80458 - std::panicking::try::do_call::hf679f17bf3b43b0b
  42:        0x10d84ce0a - __rust_maybe_catch_panic
  43:        0x108fa342f - <F as alloc::boxed::FnBox<A>>::call_box::h21b5b32059700da6
  44:        0x10d8494d4 - std::sys::imp::thread::Thread::new::thread_start::h8084b1107992ae5b
  45:     0x7fff8416399c - _pthread_body
  46:     0x7fff84163919 - _pthread_start

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions