out of memory
Open
Nobody has claimed this yet.
C-bug
I-compilemem
I-crash
P-medium
regression-from-stable-to-stable
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Unfortunately there is no kind of error or warning given by rustc, it just OOMs right away :/
I tried this code:
trait Default {
type Id;
fn intu(&self) -> &Self::Id;
}
impl<T: Default<Id = U>, U: Copy> Default for U {
default type Id = T;
fn intu(&self) -> &Self::Id {
self
}
}
fn specialization<T>(t: T) -> U {
*t.intu()
}
use std::num::NonZero;
fn main() {
let assert_eq = NonZero::<u8, Option<NonZero<u8>>>(0);
assert_eq!(specialization, None);
}
I expected to see this happen: explanation
Instead, this happened: explanation
Meta
rustc --version --verbose:
rustc 1.80.0-nightly (faefc618c 2024-05-07)
binary: rustc
commit-hash: faefc618cf48bd794cbc808448df1bf3f59f36af
commit-date: 2024-05-07
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied program with the reported rustc 1.80.0-nightly toolchain and reduce the example while preserving the out-of-memory behavior. No source file, test, expected result, or actual error output is identified, so completion would require locating the responsible compiler behavior and defining a regression test or other verified fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100