rust-lang / rust-lang/rust

hang in case of overflow with exponentially growing goals

Open
#162,637 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

I-hang T-types
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

struct W<T>(T);
trait Blowup<T> {}
impl<T> Blowup<()> for W<T> {}
impl<T, U, V> Blowup<(T, U)> for W<V>
where 
    W<V>: Blowup<T>,
    W<V>: Blowup<U>,    
{}

trait Delay {
    type Assoc;
}

impl<T> Delay for W<T>
where
    W<T>: Blowup<T>
{
    type Assoc = T;
}

fn bound<T: Delay<Assoc = ()>>() {}
fn main() {
    bound::<W<_>>();
}

Originally posted by @lcnr in #267

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by compiling the minimal Rust reproducer and confirm that exponentially growing goals cause a hang on overflow; then trace the compiler's trait-solving and overflow handling. Done means the example terminates with appropriate overflow behavior and a regression test covers it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.