Skip to content

type "(option[int])[]" does not round-trip #669

Closed
@jruderman

Description

@jruderman

Reduced from src/test/run-pass/alloca-from-derived-tydesc.rs

type r = (option[int])[];

rustc --pretty normal ~/Desktop/a.rs > ~/Desktop/ap.rs

type r = option[int][];

rustc ~/Desktop/ap.rs

ap.rs:1:21:1:22: error: expecting ;, found [

Which is wrong, the pretty-printer (omitting the parens) or the parser (requiring the parens)?

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