diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-03-06 02:37:48 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-03-06 10:36:49 +0100 |
commit | 7c1dd54895032ece871d6ec727fbd643b8214331 (patch) | |
tree | f59cff6ef1c934e874f4109d9524b9602e30b3f2 /components/plugins/lints/privatize.rs | |
parent | 64fb09ca2d5d077b4d3e0815ee3e094f67b7cf4e (diff) | |
download | servo-7c1dd54895032ece871d6ec727fbd643b8214331.tar.gz servo-7c1dd54895032ece871d6ec727fbd643b8214331.zip |
Update to Rust 2016-03-05
Diffstat (limited to 'components/plugins/lints/privatize.rs')
-rw-r--r-- | components/plugins/lints/privatize.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/components/plugins/lints/privatize.rs b/components/plugins/lints/privatize.rs index 704edcdaeda..e02c5b09212 100644 --- a/components/plugins/lints/privatize.rs +++ b/components/plugins/lints/privatize.rs @@ -31,13 +31,10 @@ impl LateLintPass for PrivatizePass { id: ast::NodeId) { if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "privatize") { for field in def.fields() { - match field.node { - hir::StructField_ { kind: hir::NamedField(name, visibility), .. } if visibility == hir::Public => { - cx.span_lint(PRIVATIZE, field.span, - &format!("Field {} is public where only private fields are allowed", - name)); - } - _ => {} + if field.vis == hir::Public { + cx.span_lint(PRIVATIZE, field.span, + &format!("Field {} is public where only private fields are allowed", + field.name)); } } } |