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

rustc stuck during assoc normalization #138665

Open
Odomontois opened this issue Mar 18, 2025 · 2 comments · May be fixed by #138676
Open

rustc stuck during assoc normalization #138665

Odomontois opened this issue Mar 18, 2025 · 2 comments · May be fixed by #138676
Assignees
Labels
A-implied-bounds Area: Implied bounds / inferred outlives-bounds C-bug Category: This is a bug. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@Odomontois
Copy link

Odomontois commented Mar 18, 2025

I tried this code:

pub(crate) trait Tailed<'a>: 'a {
    type Tail: 'a;
}

pub struct List<'a, T: Tailed<'a>> {
    next: List<'a, T::Tail>,
}

The compiler hangs during compilation, falling into infinite normalization loop.

Meta

rustc --version --verbose:

rustc 1.85.0 (4d91de4e4 2025-02-17)
binary: rustc
commit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688
commit-date: 2025-02-17
host: aarch64-apple-darwin
release: 1.85.0
LLVM version: 19.1.7
@Odomontois Odomontois added the C-bug Category: This is a bug. label Mar 18, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 18, 2025
@Odomontois Odomontois changed the title rustc stuck during heavy normalization rustc stuck during heavy assoc normalization Mar 18, 2025
@Odomontois Odomontois changed the title rustc stuck during heavy assoc normalization rustc stuck during assoc normalization Mar 18, 2025
@Odomontois
Copy link
Author

Thanks, @GoldsteinE, for help with snippet minimization

@fmease
Copy link
Member

fmease commented Mar 18, 2025

This looks very much like: #102966 (implied / inferred-outlives bounds analysis cannot handle cycles / indefinite recursion) but I haven't double checked

@fmease fmease added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-types Relevant to the types team, which will review and decide on the PR/issue. labels Mar 18, 2025
@compiler-errors compiler-errors self-assigned this Mar 18, 2025
@fmease fmease added A-implied-bounds Area: Implied bounds / inferred outlives-bounds and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-implied-bounds Area: Implied bounds / inferred outlives-bounds C-bug Category: This is a bug. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants