mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Update to Rust 2016-03-05
This commit is contained in:
parent
64fb09ca2d
commit
7c1dd54895
13 changed files with 108 additions and 113 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue