You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.
enum Tree<A> {
Leaf(A),
Node(Box<Tree<(A, A)>>)
}
fn size<A>(t: &Tree<A>) -> usize {
match t {
Tree::Leaf(_) => 1,
Tree::Node(t) => size(t)
}
}
fn main () {
let tree = Tree::Leaf(4);
println!("{}", size(&tree));
}
Where there is a polymorphic recursion which generates a problem with rustc as discussed in these issues (issue 1, issue 2).
It keeps compiling when you open VS Code, putting the CPU at a 100% load. It would be great if you could add a timeout to prevent this kind of problem when you are trying with this kind of concepts.
Thanks in advance and sorry about my English
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Frist of all, thank you for this awesome plugin.
When you have code like this:
Where there is a polymorphic recursion which generates a problem with rustc as discussed in these issues (issue 1, issue 2).
It keeps compiling when you open VS Code, putting the CPU at a 100% load. It would be great if you could add a timeout to prevent this kind of problem when you are trying with this kind of concepts.
Thanks in advance and sorry about my English
The text was updated successfully, but these errors were encountered: