Skip to content

pretty-printer omits semicolon needed to disambiguate unary op #674

Closed
@jruderman

Description

@jruderman
rustc --pretty normal src/test/run-pass/block-expr-precedence.rs

The last line,

if (true) { 12 };;; -num;

is pretty-printed as

if (true) { 12 }
-num;

which, when parsed, hits the precedence issue described in the test's comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-prettyArea: Pretty printing (including `-Z unpretty`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions