mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Replace uses of for foo in bar.iter()
and for foo in bar.iter_mut()
closes #7197
This commit is contained in:
parent
13e7de482c
commit
0038580abf
55 changed files with 141 additions and 154 deletions
|
@ -28,7 +28,7 @@ impl LintPass for PrivatizePass {
|
|||
_gen: &ast::Generics,
|
||||
id: ast::NodeId) {
|
||||
if cx.tcx.has_attr(ast_util::local_def(id), "privatize") {
|
||||
for field in def.fields.iter() {
|
||||
for field in &def.fields {
|
||||
match field.node {
|
||||
ast::StructField_ { kind: ast::NamedField(ident, visibility), .. } if visibility == Public => {
|
||||
cx.span_lint(PRIVATIZE, field.span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue