Skip to content
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

pretty-printer turns #macro(...) into tup() #671

Closed
jruderman opened this issue Jul 12, 2011 · 3 comments
Closed

pretty-printer turns #macro(...) into tup() #671

jruderman opened this issue Jul 12, 2011 · 3 comments
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`)

Comments

@jruderman
Copy link
Contributor

fn main() {
    #macro("mylambda", x, body, {fn f(int x) -> int {ret body}; f});
    assert(#mylambda(y,y*2)(8) == 16);
}

becomes

fn main() {
    tup();
    assert (#mylambda(y, y * 2)(8) == 16);
}
@msullivan
Copy link
Contributor

How are you testing this? When I try it, the compiler just straight up rejects the program.

@msullivan
Copy link
Contributor

It looks like this is fixed.

@jruderman
Copy link
Contributor Author

Yep, this is now stable:

fn main() {
    #macro("mylambda", x, body,
           {
               fn f(x: int) -> int { ret body }
               f
           });
    assert (#mylambda(y, y * 2)(8) == 16);
}

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 26, 2020
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 26, 2020
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
We can't land proper tests for the link restrictions feature until the CBMC release is out (RMC issue rust-lang#671), but we should at least build the code. Fix build and add to regression script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`)
Projects
None yet
Development

No branches or pull requests

2 participants