Closed
Description
The following code broke the the text editor I was editing it in:
Version
rustc 1.35.0 (3c235d5 2019-05-20)
Minimal test case:
struct MyStruct<'a, 'b, A, B, F>(F, &'a A, &'b B);
trait MyTrait {
type Input;
type Output;
}
trait MyOtherTrait<A, B> {};
impl<'a, 'b, A, B, F> MyTrait for MyStruct<'a, 'b, A, B, F> where
F: MyOtherTrait<Self::Input, Self::Output>
{
type Input = A;
type Output = B;
}
fn garbage () {
This function body can contain garbage.
We can put anything here as long as we don't write a close brace
and the program will still try to compile.
((((((( [[[[[[[[ {{{{{
}
Output:
rustc
will print any errors that occur, but will still try to compile, hanging indefinitely at the build stage and consuming all system memory.
Expected output:
Compilation failure.
Metadata
Metadata
Assignees
Labels
Area: The lexing & parsing of Rust source code to an ASTCategory: This is a bug.Issue: Problems and improvements with respect to memory usage during compilation.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.