Skip to content

rustc freeze whole system #28974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zakarumych opened this issue Oct 11, 2015 · 3 comments
Closed

rustc freeze whole system #28974

zakarumych opened this issue Oct 11, 2015 · 3 comments
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

Comments

@zakarumych
Copy link
Contributor

My system freezes when I try to compile this
https://gist.github.com/SCareAngel/9cb3e50c1734d4179fc4
rustc 1.5.0-nightly (e362679 2015-10-08)
ubuntu-15.04

@dotdash
Copy link
Contributor

dotdash commented Oct 11, 2015

Code:

macro_rules! foo {
    ( $e:expr) => { ($e) }
}

macro_rules! bar {
    ( < $x:ident > ) => { $x };
    ( $x:tt ) => { foo!($x) };
}

macro_rules! baz {
    ( $ ( $( $x:tt )|*)* ) => {
        {
            make($n, &[$(&[$(bar!($x)
        ),*]),*])
        }
    };
}


fn main() {
    let bar = baz!["0","1","2","3","4","5","6","7","8","9"];
}

That's eating memory really really quickly. It's even enough to just say let bar = baz![];, the values aren't required.

@dotdash dotdash added the A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) label Oct 11, 2015
@jonas-schievink
Copy link
Contributor

Might be related to #24858

@huonw
Copy link
Member

huonw commented Oct 12, 2015

It does look like a dupe of #24858, closing. Thanks for filing!

@huonw huonw closed this as completed Oct 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
Projects
None yet
Development

No branches or pull requests

4 participants