Skip to content

Format try blocks more similarly as blocks #6799

@ia0

Description

@ia0

When using a normal block as the last argument of a function, formatting is compact:

    let _ = qux(x, {
        foo();
        bar();
    });

But not for try blocks:

    let _ = qux(
        x,
        try {
            foo();
            bar();
        },
    );

Ideally, I would expect:

    let _ = qux(x, try {
        foo();
        bar();
    });

Is this behavior intended or accidental? If it is intended what's the rationale? And could it be made customizable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: a feature request (not decided/implemented)F-impacts-unstable-codeExpected impact on formatting: affects only unstable codeunstable-language-featureFormatting related to an unstable language feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions