Closed
Description
I tried this code:
fn main() {
let _ = &[(); usize::MAX];
}
I expected to see this happen: code compiles in a reasonable amount of times or the slice gets elided entirely.
Instead, this happened: code takes multiple minutes to compile/gets killed by the playground.
Meta
rustc --version --verbose
:
rustc 1.48.0-nightly (9b4154193 2020-09-14)
binary: rustc
commit-hash: 9b4154193e8471f36b1a9e781f1ef7d492fc6a6c
commit-date: 2020-09-14
host: x86_64-pc-windows-msvc
release: 1.48.0-nightly
LLVM version: 11.0
Also tested on playground stable and nightly.
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Category: This is a bug.Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcIssue: Problems and improvements with respect to memory usage during compilation.Issue: Problems and improvements with respect to compile times.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.