Skip to content

Rustfmt eating the colon in bound-less where clause entries (for lifetimes). #4637

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

Open
steffahn opened this issue Jan 12, 2021 · 3 comments · May be fixed by #4773
Open

Rustfmt eating the colon in bound-less where clause entries (for lifetimes). #4637

steffahn opened this issue Jan 12, 2021 · 3 comments · May be fixed by #4773
Labels
bug Panic, non-idempotency, invalid code, etc.

Comments

@steffahn
Copy link
Member

steffahn commented Jan 12, 2021

pub fn foo<'a>()
where
    'a: ,
{
}

becomes

pub fn foo<'a>()
where
    'a,
{
}

resulting in syntax error.

This kind of code can actually be usefult to turn 'a into an early bound lifetime.

Tested in the rustfmt shipped with nightly rust (rustfmt 1.4.30-nightly (acd9486 2020-12-20)).

@steffahn steffahn added the bug Panic, non-idempotency, invalid code, etc. label Jan 12, 2021
@steffahn steffahn changed the title Rustfmt eating the colon in bound-less where clause entries. Rustfmt eating the colon in bound-less where clause entries (for lifetimes). Jan 12, 2021
@whizsid
Copy link
Contributor

whizsid commented Mar 27, 2021

I am working on this issue

@steffahn
Copy link
Member Author

Any progress here? This bug still exists and it’s regularly annoying me.

@calebcartwright
Copy link
Member

Any progress here? This bug still exists and it’s regularly annoying me.

More info in #4773 (comment)

I appreciate that this item might be of high interest and high priority for you. However, please remember that every bug report/feature request/etc. is of high interest and high priority to someone. Like most of the dev tools teams, we've got a mountain of work to do and comparatively limited bandwidth.

If this is something you'd like to see sooner rather than later, you might want to look at trying to grab the changes from the linked PR and seeing if they can come over cleanly to the main branch (not sure whether the CI failures on that branch were transient).

Otherwise, we'll get to it when we can, and thank you for your patience in the interim!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants