Skip to content

Vec::with_capacity(u64) panics when built #38277

Closed
@JesperAxelsson

Description

@JesperAxelsson

Vec::with_capacity(u64) panics.
Error message:

rustc main.rs -v
error: internal compiler error: ../src/librustc_typeck\check/mod.rs:4396: unexpected definition: PrimTy(TyUint(u64))

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 'Box<Any>', ../src/librustc_errors/lib.rs:423
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Minimal program:
fn main() { let vec = Vec::with_capacity(u64); }

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