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
The following code causes rustc to hang, instead of emitting a normal compiler error:
Meta
rustc --version --verbose: