Skip to content

pp+parser disagree about parens around "fail" in callee position #764

New issue

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

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

Already on GitHub? # to your account

Closed
jruderman opened this issue Jul 28, 2011 · 0 comments
Closed

pp+parser disagree about parens around "fail" in callee position #764

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

Comments

@jruderman
Copy link
Contributor

This silly code fails with a type error:

fn main() { (fail)(1, 2); }

z.rs:1:12:1:18: error: mismatched types: expected function or native function but found _|_
z.rs:1 fn main() { (fail)(1, 2); }
                   ^~~~~~

but if i pretty-print it, the parens around fail are removed, and it fails with a parse error instead:

fn main() { fail(1, 2); }

z2.rs:1:18:1:19: error: expecting ), found ,
z2.rs:1 fn main() { fail(1, 2); }
                          ^

this makes the fuzzer unhappy.

I think this is a parser bug rather than a pp bug, but I'm not sure.

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
…ichton

Make stdbuild a cargo feature

Also invert the default feature / no std arrangement. The default
still uses std, but no_std now requires opt-in instead of opt-out.

This is work toward removing the shim in rustc.
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
Update for change in const lint name.
ZuseZ4 added a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* other mangleing

* adjust TypeAnalysis to Rb_tree update

* add wip test

* update test and ActivityAnalysis

* fixing older llvm tests

* fix llvm-10 and older

* fix llvm-8 and older
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`)
Projects
None yet
Development

No branches or pull requests

2 participants