Skip to content

Pretty-printer can't disambiguate alts followed by ( from function calls #840

@brson

Description

@brson

From std::lib::task:

    alt notify {
      some(c) {
        (**task_ptr).notify_enabled = 1u8;
        (**task_ptr).notify_chan = *c;
      }
      none {}
    };
    (*regs).esp = align_down((*regs).esp - 12u32) - 4u32;

Without the trailing semi, the parens are interpreted as a function call. The pretty-printer can't figure out to put the semi there (it does know how to disambiguate alts followed by unops).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions