Skip to content

Commit

Permalink
Format visibility of associated consts (#953)
Browse files Browse the repository at this point in the history
Fixes #951.
  • Loading branch information
mrBliss authored and marcusklaas committed Apr 19, 2016
1 parent 75aeca4 commit b075558
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/visitor.rs
Expand Up @@ -362,7 +362,7 @@ impl<'a> FmtVisitor<'a> {
}
ast::ImplItemKind::Const(ref ty, ref expr) => {
let rewrite = rewrite_static("const",
ast::Visibility::Inherited,
ii.vis,
ii.ident,
ty,
ast::Mutability::Immutable,
Expand Down
4 changes: 4 additions & 0 deletions tests/source/static.rs
Expand Up @@ -12,3 +12,7 @@ static mut name: SomeType = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
pub static count : u8 = 10 ;

pub const test: &Type = &val;

impl Color {
pub const WHITE: u32 = 10;
}
4 changes: 4 additions & 0 deletions tests/target/static.rs
Expand Up @@ -15,3 +15,7 @@ static mut name: SomeType =
pub static count: u8 = 10;

pub const test: &Type = &val;

impl Color {
pub const WHITE: u32 = 10;
}

0 comments on commit b075558

Please sign in to comment.