Merge pull request #596 from marcusklaas/where-indent

Fix brace indentation after where clause
This commit is contained in:
Nick Cameron 2015-11-14 10:04:04 +13:00
commit 2cf2230002
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,
}
}