Skip to content

Infinite compiler hang #1885

Closed
Closed
@bstrie

Description

@bstrie

In the course of answering this StackOverflow question I was puzzling out how to enclose the body of a macro definition when I struck upon the idea of using a self-executing anonymous closure. This worked! (Although there was some weirdness with rustc throwing errors due to being unable to infer the type of the macro invocations, forcing me to include an explicit return statement. But that's beside the point.)

Afterward while looking through Rust's test suite I checked out the macro-by-example tests and saw that the bodies of macros could simply be enclosed in braces (seen here, in the definition for #lambda). Converting my code from the anonymous self-executing closure to use the braces syntax causes rustc to hang indefinitely, consuming 100% CPU.

I've included both files here: https://gist.github.com/1886511 (the macro definitions are near the bottom of the files).

Tested on Debian 6.0.3, i686.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions