-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
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-mediumMedium priorityMedium 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.
Description
Spawned off of #4363, specifically the example provided by @goffrie
This example code causes rustc to infinite loop (playground):
enum FingerTree<A> {
Empty,
Single(A),
Deep(Node<A>)
}
struct Node<A> {
count: i32,
front: Digit<A>,
inner: Box<FingerTree<(A,A)>>,
back: Digit<A>
}
struct Digit<A> {
count: i32,
content: [Option<A>; 4]
}
fn FingerTree<A>() -> FingerTree<A> { FingerTree::Empty }
fn main() {
let _ = FingerTree::Deep(Node { count: 0,
front: Digit { count: 0, content: [None, None, None, None] },
inner: Box::new(FingerTree::Single((1, 2))),
back: Digit { count: 0, content: [None, None, None, None] }}
);
}
scottmcm
Metadata
Metadata
Assignees
Labels
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-mediumMedium priorityMedium 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.