Skip to content

Pretty printer doesn't handle & & correctly #7895

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
huonw opened this issue Jul 19, 2013 · 2 comments
Closed

Pretty printer doesn't handle & & correctly #7895

huonw opened this issue Jul 19, 2013 · 2 comments
Labels
A-pretty Area: Pretty printing (including `-Z unpretty`)

Comments

@huonw
Copy link
Member

huonw commented Jul 19, 2013

fn main() { & &"foo"; }
> rustc andand.rs --pretty
fn main() { &&"foo"; }
> rustc andand.rs --pretty | rustc -
<anon>:1:12: 1:14 error: unexpected token: `&&`
<anon>:1 fn main() { &&"foo"; }
                     ^~
@bblum
Copy link
Contributor

bblum commented Jul 19, 2013

Same bug as #7837, just a different manifestation

@emberian
Copy link
Member

Closing as dup of #7837, since correct handling of && is planned.

flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 4, 2021
Disable "if_not_else" lints from firing on else-ifs

Fixes rust-lang#7892

1. Convert `['if_not_else']` to `LateLintPass` and use `clippy_utils::is_else_clause` for checking.
2. Update tests.

changelog: [`if_not_else`] now ignores else if statements.
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

3 participants