Skip to content

debug ice: attempted to add with overflow #114912

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

rustc --edition=2021

async fn main() {
    [0usize; 0xffff_ffff_ffff_ffff].await;
}

Meta

rustc --version --verbose:

c94cb834d05888ef5beeae2cc460156f435e2fb3

Error output

error[E0277]: `[usize; usize::MAX]` is not a future
 --> D01319EFC4D41E1760BDE6D24D4EAEBDED06776A984903041C4E462ABADDEE9A.rs:2:37
  |
2 |     [0usize; 0xffff_ffff_ffff_ffff].await;
  |                                    -^^^^^
  |                                    ||
  |                                    |`[usize; usize::MAX]` is not a future
  |                                    help: remove the `.await`
  |
  = help: the trait `Future` is not implemented for `[usize; usize::MAX]`
  = note: [usize; usize::MAX] must be a future or must implement `IntoFuture` to be awaited
  = note: required for `[usize; usize::MAX]` to implement `IntoFuture`

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some way

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions