mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Fix brace indentation after where clause
This commit is contained in:
parent
686ec52b50
commit
d32245a13d
@ -793,7 +793,8 @@ impl<'a> FmtVisitor<'a> {
|
||||
let header_str = self.format_header(item_name, ident, vis);
|
||||
result.push_str(&header_str);
|
||||
result.push(';');
|
||||
return Some(result);
|
||||
|
||||
Some(result)
|
||||
}
|
||||
|
||||
fn format_struct_struct(&self,
|
||||
@ -968,8 +969,8 @@ impl<'a> FmtVisitor<'a> {
|
||||
terminator,
|
||||
Some(span.hi)));
|
||||
result.push_str(&where_clause_str);
|
||||
result.push_str(&self.block_indent.to_string(self.config));
|
||||
result.push('\n');
|
||||
result.push_str(&self.block_indent.to_string(self.config));
|
||||
result.push_str(opener);
|
||||
} else {
|
||||
result.push(' ');
|
||||
|
@ -135,3 +135,9 @@ struct Foo<T>(TTTTTTTTTTTTTTTTT, // Foo
|
||||
TTTTTTTTTTTTTTTTTTT,
|
||||
// Qux (FIXME #572 - doc comment)
|
||||
UUUUUUUUUUUUUUUUUUU);
|
||||
|
||||
mod m {
|
||||
struct X<T> where T: Sized {
|
||||
a: T,
|
||||
}
|
||||
}
|
||||
|
@ -141,3 +141,11 @@ struct Foo<T>(TTTTTTTTTTTTTTTTT, // Foo
|
||||
TTTTTTTTTTTTTTTTTTT,
|
||||
// Qux (FIXME #572 - doc comment)
|
||||
UUUUUUUUUUUUUUUUUUU);
|
||||
|
||||
mod m {
|
||||
struct X<T>
|
||||
where T: Sized
|
||||
{
|
||||
a: T,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user