about summary refs log tree commit diff
diff options
context:
space:
mode:
authorP1start <rewi-github@whanau.org>2014-09-13 13:58:35 +1200
committerP1start <rewi-github@whanau.org>2014-10-03 20:39:56 +1300
commit333592edde810324c9730a89372fa5164d10871d (patch)
tree12d4dbd14fc527569f55eeb5337e478866dbbd54
parent94bcd3539c761b4ecf423800bce21057c4e961fa (diff)
downloadrust-333592edde810324c9730a89372fa5164d10871d.tar.gz
rust-333592edde810324c9730a89372fa5164d10871d.zip
Update the `unused` lint group to include more lints
-rw-r--r--src/librustc/lint/builtin.rs8
-rw-r--r--src/librustc/lint/context.rs3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs
index 7a59aeb5789..8ffda8bd827 100644
--- a/src/librustc/lint/builtin.rs
+++ b/src/librustc/lint/builtin.rs
@@ -631,7 +631,7 @@ impl LintPass for UnusedAttribute {
     }
 }
 
-declare_lint!(PATH_STATEMENT, Warn,
+declare_lint!(pub PATH_STATEMENT, Warn,
               "path statements with no effect")
 
 pub struct PathStatement;
@@ -655,10 +655,10 @@ impl LintPass for PathStatement {
     }
 }
 
-declare_lint!(UNUSED_MUST_USE, Warn,
+declare_lint!(pub UNUSED_MUST_USE, Warn,
               "unused result of a type flagged as #[must_use]")
 
-declare_lint!(UNUSED_RESULT, Allow,
+declare_lint!(pub UNUSED_RESULT, Allow,
               "unused result of an expression in a statement")
 
 pub struct UnusedResult;
@@ -1136,7 +1136,7 @@ impl LintPass for UnnecessaryImportBraces {
     }
 }
 
-declare_lint!(UNUSED_UNSAFE, Warn,
+declare_lint!(pub UNUSED_UNSAFE, Warn,
               "unnecessary use of an `unsafe` block")
 
 pub struct UnusedUnsafe;
diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs
index 51852a347d1..bb277511463 100644
--- a/src/librustc/lint/context.rs
+++ b/src/librustc/lint/context.rs
@@ -203,7 +203,8 @@ impl LintStore {
 
         add_lint_group!(sess, "unused",
                         UNUSED_IMPORTS, UNUSED_VARIABLE, DEAD_ASSIGNMENT, DEAD_CODE,
-                        UNUSED_MUT, UNREACHABLE_CODE, UNUSED_EXTERN_CRATE)
+                        UNUSED_MUT, UNREACHABLE_CODE, UNUSED_EXTERN_CRATE, UNUSED_MUST_USE,
+                        UNUSED_UNSAFE, UNUSED_RESULT, PATH_STATEMENT)
 
         // We have one lint pass defined in this module.
         self.register_pass(sess, false, box GatherNodeLevels as LintPassObject);