aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lints/privatize.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/plugins/lints/privatize.rs')
-rw-r--r--components/plugins/lints/privatize.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/plugins/lints/privatize.rs b/components/plugins/lints/privatize.rs
index cf3d933c010..704edcdaeda 100644
--- a/components/plugins/lints/privatize.rs
+++ b/components/plugins/lints/privatize.rs
@@ -25,12 +25,12 @@ impl LintPass for PrivatizePass {
impl LateLintPass for PrivatizePass {
fn check_struct_def(&mut self,
cx: &LateContext,
- def: &hir::StructDef,
+ def: &hir::VariantData,
_n: ast::Name,
_gen: &hir::Generics,
id: ast::NodeId) {
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "privatize") {
- for field in &def.fields {
+ 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,