Fail to format GAT with where clause
Closed this issue · 1 comments
hsfzxjy commented
Currently rustfmt on stable channel cannot handle the following case:
use std::borrow::Cow;
pub trait CloneS<'a> {
type Output<'b: 'a>
where
Self: 'b;
fn clone_s<'b: 'a>(&'b self) -> Self::Output<'b>;
}
impl<'a, T: ?Sized + ToOwned> CloneS<'a> for Cow<'a, T> {
// fail to format below
type Output<'b: 'a>
= Cow<'b, T>
where
Self: 'b;
fn clone_s<'b: 'a>(&'b self) -> Self::Output<'b> {
Cow::Borrowed(&**self)
}
}
ytmimi commented
Formatting support was released in version 1.8.0, which is available on nightly. The current stable release is still v1.7.1, which doesn't support formatting for trailing where clauses.