hang in trait selection
Open
Nobody has claimed this yet.
C-bug
I-hang
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
struct S<T> {
a: Option<Box<S<(T, T)>>>,
b: T,
}
fn main() {
S { a: None, b: 0i32 };
}
a lot of cpu in rustc_trait_selection::traits::query::dropck_outlives::trivial_dropck_outlives according to perf top
Meta
rustc --version --verbose:
rustc 1.93.0-nightly (c23ed3ef2 2025-11-23)
binary: rustc
commit-hash: c23ed3ef28b3cc30658310f771ddc66e5b687cf4
commit-date: 2025-11-23
host: x86_64-unknown-linux-gnu
release: 1.93.0-nightly
LLVM version: 21.1.5
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 compiling the reported Rust snippet with the nightly compiler version shown, then profile the run and inspect rustc_trait_selection::traits::query::dropck_outlives::trivial_dropck_outlives. Confirm the trait-selection hang or excessive CPU usage and identify a change that lets this input complete without the reported hotspot dominating execution.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100