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

in which unused-parens suggestions heed what the user actually wrote #55138

Merged
merged 1 commit into from
Oct 25, 2018

Commits on Oct 17, 2018

  1. in which unused-parens suggestions heed what the user actually wrote

    Aaron Hill pointed out that unnecessary parens around a macro call
    (paradigmatically, `format!`) yielded a suggestion of hideous
    macro-expanded code. (The slightly unusual choice of using the
    pretty-printer to compose suggestions was quite recently commented on
    in the commit message for 1081bbb ("abolish ICE when pretty-printing
    async block"), but without any grounds to condemn it as a 𝘣𝘢𝘥
    choice. Hill's report provides the grounds.) `span_to_snippet` is
    fallable as far as the type system is concerned (because, who knows,
    macros or something), so the pretty-printing can live on in the
    oft-neglected `else` branch.
    
    Resolves rust-lang#55109.
    zackmdavis committed Oct 17, 2018
    Configuration menu
    Copy the full SHA
    475be10 View commit details
    Browse the repository at this point in the history