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

comment in const generic default causes line duplication #5668

Closed
oli-obk opened this issue Jan 23, 2023 · 0 comments · Fixed by #5669
Closed

comment in const generic default causes line duplication #5668

oli-obk opened this issue Jan 23, 2023 · 0 comments · Fixed by #5669

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Jan 23, 2023

type Foo = impl Send;
struct Struct<
    const C: usize = {
        let _: Foo = ();
        //~^ ERROR: mismatched types
        0
    },
>;

gets formatted to

type Foo = impl Send;
struct Struct<
    const C: usize = {
        let _: Foo = ();
        //~^ ERROR: mismatched types
        0
    },
>
;
//~^ ERROR: mismatched types
0
},
>;

Without the comment, the formatting doesn't change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant