]> git.lizzy.rs Git - rust.git/commitdiff
Make ptr_arg lint warn by default
authorFlorian Hartwig <florian.j.hartwig@gmail.com>
Wed, 14 Oct 2015 17:51:54 +0000 (19:51 +0200)
committerFlorian Hartwig <florian.j.hartwig@gmail.com>
Wed, 14 Oct 2015 18:35:44 +0000 (20:35 +0200)
README.md
src/lib.rs
src/ptr_arg.rs

index e57ca8d1e024e80fb83a941c0db93b678aa8d5d2..a01315835976e23e3f885539f48928c80499191c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ name
 [nonsensical_open_options](https://github.com/Manishearth/rust-clippy/wiki#nonsensical_open_options)   | warn    | nonsensical combination of options for opening a file
 [option_unwrap_used](https://github.com/Manishearth/rust-clippy/wiki#option_unwrap_used)               | allow   | using `Option.unwrap()`, which should at least get a better message using `expect()`
 [precedence](https://github.com/Manishearth/rust-clippy/wiki#precedence)                               | warn    | catches operations where precedence may be unclear. See the wiki for a list of cases caught
-[ptr_arg](https://github.com/Manishearth/rust-clippy/wiki#ptr_arg)                                     | allow   | fn arguments of the type `&Vec<...>` or `&String`, suggesting to use `&[...]` or `&str` instead, respectively
+[ptr_arg](https://github.com/Manishearth/rust-clippy/wiki#ptr_arg)                                     | warn    | fn arguments of the type `&Vec<...>` or `&String`, suggesting to use `&[...]` or `&str` instead, respectively
 [range_step_by_zero](https://github.com/Manishearth/rust-clippy/wiki#range_step_by_zero)               | warn    | using Range::step_by(0), which produces an infinite iterator
 [redundant_closure](https://github.com/Manishearth/rust-clippy/wiki#redundant_closure)                 | warn    | using redundant closures, i.e. `|a| foo(a)` (which can be written as just `foo`)
 [redundant_pattern](https://github.com/Manishearth/rust-clippy/wiki#redundant_pattern)                 | warn    | using `name @ _` in a pattern
index 5276ad711c0911dae678ecd252f6a4281b88920b..8bf199bff4792442a82bba44d48306213776f041 100755 (executable)
@@ -101,7 +101,6 @@ pub fn plugin_registrar(reg: &mut Registry) {
         methods::WRONG_PUB_SELF_CONVENTION,
         mut_mut::MUT_MUT,
         mutex_atomic::MUTEX_INTEGER,
-        ptr_arg::PTR_ARG,
         shadow::SHADOW_REUSE,
         shadow::SHADOW_SAME,
         shadow::SHADOW_UNRELATED,
@@ -153,6 +152,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
         needless_bool::NEEDLESS_BOOL,
         open_options::NONSENSICAL_OPEN_OPTIONS,
         precedence::PRECEDENCE,
+        ptr_arg::PTR_ARG,
         ranges::RANGE_STEP_BY_ZERO,
         returns::LET_AND_RETURN,
         returns::NEEDLESS_RETURN,
index be11ebce26a223b1a4fe30e66e449b9346ca79d0..4baba7118863716bea3a722c95650d6a4ae41873 100644 (file)
@@ -1,6 +1,6 @@
 //! Checks for usage of &Vec[_] and &String
 //!
-//! This lint is **allow** by default
+//! This lint is **warn** by default
 
 use rustc::lint::*;
 use rustc_front::hir::*;
@@ -11,7 +11,7 @@
 
 declare_lint! {
     pub PTR_ARG,
-    Allow,
+    Warn,
     "fn arguments of the type `&Vec<...>` or `&String`, suggesting to use `&[...]` or `&str` \
      instead, respectively"
 }