aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lints/privatize.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2015-07-03 15:14:08 +0200
committerMs2ger <ms2ger@gmail.com>2015-07-04 11:32:41 +0200
commit75e3e787f629d44d70935abec513032ef08ce5c8 (patch)
treef32ed37302a795025d57174387efe7908823218c /components/plugins/lints/privatize.rs
parent02d84a13470271d18198af118d4f25ee45fe6917 (diff)
downloadservo-75e3e787f629d44d70935abec513032ef08ce5c8.tar.gz
servo-75e3e787f629d44d70935abec513032ef08ce5c8.zip
Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03)
Diffstat (limited to 'components/plugins/lints/privatize.rs')
-rw-r--r--components/plugins/lints/privatize.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/plugins/lints/privatize.rs b/components/plugins/lints/privatize.rs
index d2b5e6744b9..cc20b286453 100644
--- a/components/plugins/lints/privatize.rs
+++ b/components/plugins/lints/privatize.rs
@@ -6,7 +6,6 @@ use syntax::{ast, ast_util};
use syntax::ast::Public;
use syntax::attr::AttrMetaMethods;
use rustc::lint::{Context, LintPass, LintArray};
-use rustc::middle::ty;
declare_lint!(PRIVATIZE, Deny,
"Allows to enforce private fields for struct definitions");
@@ -28,7 +27,7 @@ impl LintPass for PrivatizePass {
_i: ast::Ident,
_gen: &ast::Generics,
id: ast::NodeId) {
- if ty::has_attr(cx.tcx, ast_util::local_def(id), "privatize") {
+ if cx.tcx.has_attr(ast_util::local_def(id), "privatize") {
for field in def.fields.iter() {
match field.node {
ast::StructField_ { kind: ast::NamedField(ident, visibility), .. } if visibility == Public => {