Fix brace indentation after where clause

This commit is contained in:
Marcus Klaas 2015-11-13 14:31:20 +01:00
parent 686ec52b50
commit d32245a13d
3 changed files with 17 additions and 2 deletions

View File

@ -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(' ');

View File

@ -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,
}
}

View File

@ -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,
}
}