-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-field_projections`#![feature(field_projections)]``#![feature(field_projections)]`I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
The following code causes rustc to hang, instead of emitting a normal compiler error:
#![feature(field_projections)]
#![expect(incomplete_features)]
use std::field::{Field, field_of};
pub struct Weird<T>(<field_of!(Weird<Option<T>>, 0) as Field>::Type);Meta
rustc --version --verbose:
rustc 1.96.0-nightly (38c0de8dc 2026-02-28)
binary: rustc
commit-hash: 38c0de8dcb14d42290042521be9958d37f3fa390
commit-date: 2026-02-28
host: x86_64-pc-windows-msvc
release: 1.96.0-nightly
LLVM version: 22.1.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-field_projections`#![feature(field_projections)]``#![feature(field_projections)]`I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.