diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-09-02 07:57:55 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-09-02 09:22:17 +0200 |
commit | 40b4348824f96a0f37b39f38a024b6061b36b0a7 (patch) | |
tree | 0c7b91cac0e789c3d53bf11fcda475037f1de0e5 /components/plugins/lints/privatize.rs | |
parent | ba2cb77c26006dc378553d757e88de8ab86c4d5b (diff) | |
download | servo-40b4348824f96a0f37b39f38a024b6061b36b0a7.tar.gz servo-40b4348824f96a0f37b39f38a024b6061b36b0a7.zip |
Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01)
Diffstat (limited to 'components/plugins/lints/privatize.rs')
-rw-r--r-- | components/plugins/lints/privatize.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/plugins/lints/privatize.rs b/components/plugins/lints/privatize.rs index 7ef92eeaf30..a4a684b68ab 100644 --- a/components/plugins/lints/privatize.rs +++ b/components/plugins/lints/privatize.rs @@ -3,9 +3,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use rustc::lint::{Context, LintPass, LintArray}; +use rustc::middle::def_id::DefId; +use syntax::ast; use syntax::ast::Public; use syntax::attr::AttrMetaMethods; -use syntax::{ast, ast_util}; declare_lint!(PRIVATIZE, Deny, "Allows to enforce private fields for struct definitions"); @@ -27,7 +28,7 @@ impl LintPass for PrivatizePass { _i: ast::Ident, _gen: &ast::Generics, id: ast::NodeId) { - if cx.tcx.has_attr(ast_util::local_def(id), "privatize") { + if cx.tcx.has_attr(DefId::local(id), "privatize") { for field in &def.fields { match field.node { ast::StructField_ { kind: ast::NamedField(ident, visibility), .. } if visibility == Public => { |