Repository navigation
Closed
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.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.P-lowLow priorityLow priorityT-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.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
Description
In stable, rustc 1.48.0 (7eac88abb 2020-11-16), rustc demo.rs promptly returns overflow evaluating the requirement and exits. This is expected behavior.
In nightly, rustc 1.50.0-nightly (5be3f9f10 2020-12-03), rustc demo.rs hangs indefinitely, using 100% of one core. Memory usage fluctuates but tends to grow over time at ~800 MB per minute on my machine.
Source
pub trait Baz {}
impl Baz for () {}
impl<T> Baz for [T; 3] {}
pub trait Fiz {}
impl Fiz for bool {}
pub trait Corge<S> {
type Foo;
}
impl<W: Corge<()>> Corge<[(); 3]> for W {
type Foo = [<W as Corge<()>>::Foo; 3];
}
pub trait Grault
where
Self::B: Fiz,
{
type A;
type B;
}
impl<T: Grault> Grault for [T; 3]
where
Self::A: Baz,
Self::B: Fiz,
{
type A = [T::A; 3];
type B = T::B;
}
pub trait Quaks<S, W> {
fn bar() {}
}
impl<S> Quaks<S, bool> for u8
where
bool: Corge<S>,
<bool as Corge<S>>::Foo: Grault,
{
}
fn main() {
<u8 as Quaks<[(); 3], bool>>::bar();
}rustc --version --verbose:
rustc 1.50.0-nightly (5be3f9f10 2020-12-03)
binary: rustc
commit-hash: 5be3f9f10e9fd59ea03816840a6051413fbdefae
commit-date: 2020-12-03
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.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.P-lowLow priorityLow priorityT-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.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Activity
JohnTitor commentedon Dec 5, 2020
This happens on beta as well.
JohnTitor commentedon Dec 5, 2020
The regression introduced between
nightly-2020-10-06(a1dfd24) andnightly-2020-10-07(98edd1f)Possible culprit PRs: #77606, #73905 (UPDATE: confirmed #73905 is the cause)
camelid commentedon Dec 6, 2020
Assigning
P-highand removingI-prioritizeas discussed in the prioritization working group.Mark-Simulacrum commentedon Dec 11, 2020
I am going to move this to P-low as this isn't breaking working code, we have more urgent fall out from #73905 that needs to be fixed first.
[-]rustc nightly hangs and leaks memory[/-][+]rustc hangs and leaks memory[/+]Make recursion limit fatal in project
Prevent caching projections in the case of cycles
Auto merge of rust-lang#80246 - matthewjasper:projection-cycle-cachin…
Make recursion limit fatal in project
Prevent caching projections in the case of cycles
Make recursion limit fatal in project
Prevent caching projections in the case of cycles