rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

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

Open steffahn opened this issue 4 years ago • 3 comments

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 avatar Jan 12 '21 14:01 steffahn

I am working on this issue

whizsid avatar Mar 27 '21 18:03 whizsid

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

steffahn avatar Jul 31 '22 08:07 steffahn

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

More info in https://github.com/rust-lang/rustfmt/pull/4773#issuecomment-1200460795

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!

calebcartwright avatar Jul 31 '22 16:07 calebcartwright