Format visibility of associated consts (#953)

Fixes #951.
This commit is contained in:
mrBliss 2016-04-19 20:19:14 +02:00 committed by Marcus Klaas de Vries
parent 75aeca4d39
commit b0755581ca
3 changed files with 9 additions and 1 deletions

View File

@ -362,7 +362,7 @@ pub fn visit_impl_item(&mut self, ii: &ast::ImplItem) {
}
ast::ImplItemKind::Const(ref ty, ref expr) => {
let rewrite = rewrite_static("const",
ast::Visibility::Inherited,
ii.vis,
ii.ident,
ty,
ast::Mutability::Immutable,

View File

@ -12,3 +12,7 @@
pub static count : u8 = 10 ;
pub const test: &Type = &val;
impl Color {
pub const WHITE: u32 = 10;
}

View File

@ -15,3 +15,7 @@
pub static count: u8 = 10;
pub const test: &Type = &val;
impl Color {
pub const WHITE: u32 = 10;
}