Skip to content
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

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

Closed
JesperAxelsson opened this issue Dec 10, 2016 · 2 comments · Fixed by #38375
Closed

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

JesperAxelsson opened this issue Dec 10, 2016 · 2 comments · Fixed by #38375
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@JesperAxelsson
Copy link

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); }

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Dec 10, 2016
@Stebalien
Copy link
Contributor

Duplicate of #38155 and #38188, fixed in #38154. /cc @petrochenkov

@steveklabnik
Copy link
Member

Closing as a duplicate, thank you!

bors added a commit that referenced this issue Dec 15, 2016
Fix regression in resolution of primitive types

Fix often encountered ICE.
Extracted from #38154
Fixes #38155, fixes #38188, fixes #38277, fixes #38280, fixes #38292, fixes #38311, fixes #38344, fixes #38363, fixes #38372 (duplicates)

r? @jseyfried or @eddyb or @nrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants