Tristian Celestin
12af338150
Add space between colon and type annotation
...
Wrapped string in Rust don't require a backslash
2017-02-26 23:07:53 -05:00
Tristian Celestin
75e28610a7
Merged drop_forget_ref.rs with drop_forget_copy.rs.
...
Moved constant message strings out of declare_lint! macros.
2017-02-26 21:57:47 -05:00
Tristian Celestin
3075b01d8c
Stored linter messages in constants.
...
Use is_copy() function instead of calling moves_by_default()
2017-02-26 17:57:56 -05:00
Tristian Celestin
aa037d1ef0
Merge branch 'master' into 1537-drop_copy
2017-02-25 23:11:21 -05:00
Tristian Celestin
b8defc6cc4
Warn on calls to std::mem::drop
or std::mem::forget
with a Copy
type
2017-02-25 23:05:37 -05:00
sinkuu
5906639af5
Enable len_zero
for slices
2017-02-25 12:26:33 +09:00
Steve Klabnik
c37d5f2563
update semver version
2017-02-22 15:52:57 -05:00
Oliver Schneider
19929790aa
Merge pull request #1561 from Manishearth/zero_ptr
...
New zero_ptr lint.
2017-02-22 13:34:28 +01:00
sinkuu
1e26c44010
Suggest assert_ne
for assert!(x != y)
2017-02-22 16:47:18 +09:00
Andre Bogus
3c04109fcc
fix German keyboard fail
2017-02-21 17:28:17 +01:00
Oliver Schneider
d032b8967c
Merge pull request #1491 from Manishearth/into_iter_on_ref
...
fix explicit_into_iter_loop on references
2017-02-21 14:55:52 +01:00
Oliver Schneider
27aa309b3d
Merge pull request #1556 from sinkuu/take_by_value
...
Lint needless take-by-value
2017-02-21 13:07:25 +01:00
Oliver Schneider
42c451c122
update help message to match the suggestion
2017-02-21 12:04:48 +01:00
Oliver Schneider
21a0b16aee
adjust messages in tests
2017-02-21 12:04:29 +01:00
Oliver Schneider
c46178c518
rustfmt
2017-02-21 12:01:41 +01:00
Oliver Schneider
c1cf5a2cde
cleanup and create another helper function that we should use more often
2017-02-21 12:01:41 +01:00
Oliver Schneider
0bea3e76d4
fix explicit_into_iter_loop on references
...
fixes #1398
2017-02-21 12:01:41 +01:00
sinkuu
bf21c84629
Ensure deref_span is empty for Vec and String
2017-02-21 19:45:45 +09:00
sinkuu
cb86c57c5f
Integrate suggestion spans
2017-02-21 19:03:50 +09:00
sinkuu
3516d45d7c
Use multispan_sugg
2017-02-21 18:44:31 +09:00
Oliver Schneider
f07f793fa8
Merge pull request #1544 from bood/master
...
Add lint for unnecessary casts (cast to same type)
2017-02-21 09:16:07 +01:00
Andre Bogus
2f7babba82
New zero_ptr lint.
...
This fixes #1047 . I did not bother to add a full suggestion,
because replacing with `std::ptr::null()` may still lead to
inference failures.
2017-02-21 04:36:59 +01:00
sinkuu
627d24c80f
Fix suggestion for let <pat>
2017-02-21 00:27:12 +09:00
sinkuu
f1b0b774e7
Support non-moving usages at match
...
This `match` is not moving the `String`:
```rust
fn foo(x: Option<String>) -> i32 {
match x {
Some(_) => 1,
None => 2,
}
}
```
With this change, it will be linted and suggested to add `*` to deref it.
```rust
fn foo(x: &Option<String>) -> i32 {
match *x {
Some(_) => 1,
None => 2,
}
}
```
2017-02-20 16:45:37 +09:00
sinkuu
0a6bc6031a
Rename lint to needless_take_by_value
...
And fixes false-positives for generics and `match`
2017-02-20 16:02:48 +09:00
Phil Ellison
2dd45b7317
Use span of impl/trait in len_without_is_empty error message, rather than the span of the len method
2017-02-19 15:14:30 +00:00
sinkuu
d2f73e7818
Add explanation
2017-02-19 18:07:37 +09:00
sinkuu
d81d961ba7
Lint needless take-by-value
2017-02-19 07:59:44 +09:00
Bood Qian
97d46232b4
Merge branch 'master' of github.com:Manishearth/rust-clippy
2017-02-18 11:12:13 +08:00
sinkuu
d2b9b7ece2
Fix language & if_let_chain usage
2017-02-18 10:14:25 +09:00
sinkuu
8cb2ec804d
Support generic type
2017-02-18 10:14:25 +09:00
sinkuu
16e53c9868
Run update_lints.py
2017-02-18 10:14:20 +09:00
sinkuu
6bb426b0e3
Add should_assert_eq
lint ( fixes #641 )
2017-02-18 10:13:56 +09:00
Oliver Schneider
9d8dc689c7
rustfmt again
2017-02-17 13:41:59 +01:00
Oliver Schneider
b1f766b37b
fix dogfood tests
2017-02-17 13:23:19 +01:00
Andre Bogus
6c8a6c18ab
deal with binary op short-circuit
2017-02-17 08:49:34 +01:00
Andre Bogus
505eb53d29
New never loop lint
...
This lint detects loops that unconditionally break or return.
Closes #257
2017-02-17 04:53:14 +01:00
Bood Qian
05a6945adc
Rust fmt
2017-02-17 08:39:58 +08:00
Ben Boeckel
84509ca48a
typos: coma -> comma
2017-02-16 11:23:28 -05:00
Bood Qian
2f00ea3a07
Suppress lint for unsuffixed number casts
2017-02-16 22:55:41 +08:00
Bood Qian
afce85e96d
Add lint for unnecessary casts (cast to same type)
2017-02-15 22:20:20 +08:00
Oliver Schneider
40ea5e8c5d
run util/update_lint
2017-02-13 11:40:27 +01:00
Oliver Schneider
2265babe6a
Merge remote-tracking branch 'origin/master' into clonedCollect
2017-02-13 11:40:02 +01:00
Oliver Schneider
b13d206a22
run rustfmt
2017-02-13 11:18:03 +01:00
Oliver Schneider
637a4590f6
Merge remote-tracking branch 'origin/master'
2017-02-13 11:15:12 +01:00
Martin Carton
9a7597d5af
Merge pull request #1528 from Manishearth/mut-from-ref
...
New `mut_from_ref` lint
2017-02-12 16:01:15 +01:00
Andre Bogus
2a0bfdcd72
rustfmt
2017-02-12 14:11:18 +01:00
Andre Bogus
36b8554cf1
add notes for immutable inputs
2017-02-12 13:53:30 +01:00
f001
b3570db094
update via comments
2017-02-12 20:40:38 +08:00
f001
5a039f68f7
format adjust
2017-02-12 17:24:59 +08:00
f001
98aa0db0ac
Add a lint for slice.iter().cloned().collect()
...
If one uses `slice.iter().cloned().collect()` to create a new `Vec`,
it should be `slice.to_owned()`.
Fix #1292
2017-02-12 17:03:09 +08:00
Bood Qian
9824c997fe
Remove unnecessary ref
2017-02-12 09:16:37 +08:00
Bood Qian
1c381ec642
Move more into if_let_chain
2017-02-11 22:11:19 +08:00
Bood Qian
12c53752b8
Apply rustfmt
2017-02-11 21:47:26 +08:00
Bood Qian
64d2f8af8e
Lint on panic!
only
2017-02-11 21:42:42 +08:00
Bood Qian
a2d752807a
Lint on Err(_)
arm of a match
2017-02-11 14:57:50 +08:00
Owen Sanchez
8fb582ea1c
rustfmt
2017-02-10 21:08:50 -07:00
Owen Sanchez
45a7012fd9
Search directly for the largest and smallest variants instead of sorting
2017-02-10 18:12:32 -07:00
Owen Sanchez
1938904fcd
Change large_enum_variant to lint against size differences rather than size
2017-02-10 18:12:32 -07:00
Owen Sanchez
7e4b633417
Add some writes to a log file for debugging
2017-02-10 18:11:10 -07:00
Andre Bogus
bff4c30ac7
added test, fixed message & description, rustfmt
2017-02-11 00:32:12 +01:00
Andre Bogus
5650a599a8
New mut_from_ref lint
...
This fixes #1507 .
2017-02-10 19:39:03 +01:00
Martin Carton
37a0e52a1e
Merge pull request #1520 from Manishearth/rustup
...
rustup and compile-fail -> ui test move
2017-02-08 21:07:19 +01:00
Nathan Musoke
f2603ba2b2
doc-markdown: Allow LaTeX-related words
...
Add "TeX", "LaTeX", "BibTeX" and "BibLaTeX" to the default list of allowed
words.
2017-02-08 09:14:18 +13:00
Oliver Schneider
fd1351f6e3
rustup and compile-fail -> ui test move
2017-02-07 21:05:30 +01:00
Martin Carton
4ee839857b
Merge pull request #1506 from bood/master
...
Lint for possible missing comma in an array #1177
2017-02-07 18:56:38 +01:00
Owen Sanchez
59e0ae75d0
Make rustfmt happy
2017-02-05 09:51:31 -07:00
Owen Sanchez
31919aff3b
Revert changes from accidentally running rustfmt
2017-02-04 22:22:33 -07:00
Owen Sanchez
c922eb9db5
Suggest to use a wrapper in the wiki for the empty_enum lint
2017-02-04 22:09:54 -07:00
Owen Sanchez
1193f4fb68
Run update_lints.py
2017-02-04 21:54:21 -07:00
Owen Sanchez
49238ad1d2
Implement empty_enum lint and add a test
2017-02-04 21:52:44 -07:00
Owen Sanchez
e88e637b67
Add empty_enum lint (just a copy of large_enum_variant for now)
2017-02-04 21:07:54 -07:00
Bood Qian
4b4dc0a4d3
Fix lint name in comment too
2017-02-05 11:06:19 +08:00
Oliver Schneider
d198b99472
fix false negatives introduced in the rustup
2017-02-04 16:59:06 +01:00
Bood Qian
9ace6c7ffc
Consider expression with macro for possible missing comma lint
2017-02-04 21:13:36 +08:00
Oliver Schneider
7fbc7c0bb2
version bump
2017-02-04 13:42:13 +01:00
Oliver Schneider
384eb82526
don't record elided lifetimes on trait objects
2017-02-04 13:18:51 +01:00
Bood Qian
97301434cd
Fix abbreviations in document
2017-02-04 20:11:43 +08:00
Bood Qian
25fd8c6ba1
Shorten lint name for possible missing comma
2017-02-04 20:05:25 +08:00
Mrmaxmeier
d68f0797bf
Rustup to nightly from 2017-01-31
2017-02-03 14:16:14 +01:00
Mrmaxmeier
2be75ef973
repeat_str feature has been stablilized
2017-02-03 14:16:14 +01:00
Mrmaxmeier
2216a890a6
TyCtxt::map is now called TyCtxt::hir
2017-02-03 14:16:07 +01:00
Bood Qian
33577ec3f7
Lint for possible missing comma in an array #1177
2017-02-03 19:10:30 +08:00
Martin Carton
b1be0d6457
Merge pull request #1492 from Manishearth/largeEnumVariant
...
large_enum_variants lint suggests to box variants above a configurable limit
2017-01-31 19:12:43 +01:00
Oliver Schneider
909ef37f08
Merge pull request #1490 from Manishearth/excl_range_pat_overlap
...
correctly check exclusive range patterns for overlap
2017-01-31 12:40:21 +01:00
Oliver Schneider
75f605ccf6
rustfmt
2017-01-31 11:26:18 +01:00
Oliver Schneider
9bda699c80
improve messages and add suggestions
2017-01-31 08:36:39 +01:00
Oliver Schneider
d9ec55e695
address nits
2017-01-31 08:08:54 +01:00
Ben Boeckel
2cdba9cd85
methods: fix the option_unwrap_used message
...
It had a hard linewrap in it rather than flowing naturally. This
confused the Vim error matching.
2017-01-30 10:44:52 -05:00
Oliver Schneider
82dd50d0e2
large_enum_variants lint suggests to box variants above a configurable limit
2017-01-30 13:17:56 +01:00
Oliver Schneider
aebdf74e16
correctly check exclusive range patterns for overlap
2017-01-30 12:30:16 +01:00
Pascal Hertleif
2ba03c8467
Make Travis' rustfmt happy
2017-01-28 14:17:37 +01:00
Pascal Hertleif
8cbf548f7e
Add suggestions to EXPLICIT_[INTO_]ITER_LOOP
...
Also reduces the highlighted span to the expr containing the
`.[into_]iter()` call (so the suggestion is probably applicable by
rustfix.)
Fixes #1484
2017-01-28 14:02:49 +01:00
Oliver Schneider
d825f194fd
version bump
2017-01-27 10:14:15 +01:00
Tom Prince
a140c3c1bf
Remove unused import.
2017-01-26 15:41:00 -07:00
Tom Prince
3e03b5d1a7
Fix #1476 : Add support for exclusive pattern matches.
2017-01-26 15:32:34 -07:00
Oliver Schneider
26e8558d8a
remove rustc-serialize dependency and factor util::cargo
out into a crate
2017-01-26 11:31:26 +01:00
mcarton
b784f0d736
Use span_suggestion
in the precedence
lint
2017-01-22 15:00:10 +01:00
mcarton
a99f8a1726
Bump to 0.0.111
2017-01-21 20:43:51 +01:00
Pascal Hertleif
b228434036
Rustfmtup to 0.7.1
2017-01-21 18:04:59 +01:00
Pascal Hertleif
6f103de164
Rustup to nightly from 2017-01-20
...
Adjust `multispan_sugg` to rust-lang/rust#38955
2017-01-21 17:20:01 +01:00
mcarton
83373c55bd
Bump to 0.0.110
2017-01-20 19:24:27 +01:00
mcarton
426660f00c
Fix rustfmt
2017-01-20 19:09:04 +01:00
Oliver Schneider
0397c6ee9a
publish
2017-01-19 17:10:57 +01:00
Mrmaxmeier
84c57ad221
rustup to rustc 1.16.0-nightly ( c07a6ae77
2017-01-17)
2017-01-18 21:35:38 +01:00
Oliver Schneider
713da45906
apply rustfmt
2017-01-17 19:30:32 +01:00
Ms2ger
687e5717ba
Update toml version.
2017-01-17 12:13:17 +01:00
Oliver Schneider
219da6d736
Merge pull request #1444 from Manishearth/or_else_method
...
Extend or_fun_call to also cover methods
2017-01-15 14:38:51 +01:00
sinkuu
cdfe002ee1
Use closure body span ( fixes #1405 )
2017-01-15 13:16:02 +09:00
Andre Bogus
94c97d2ec9
formatting
2017-01-15 01:12:16 +01:00
Andre Bogus
b764b2a7aa
extend or_fun_call lint to cover methods
2017-01-15 00:31:20 +01:00
Andre Bogus
2fdb6e4d1a
deprecate extend_from_slice lint
2017-01-14 14:39:41 +01:00
Oliver Schneider
d944d7df9a
rustup to 2017-01-12
2017-01-13 17:04:56 +01:00
Xidorn Quan
00e6d43a07
Upgrade regex to 0.2
2017-01-11 22:44:46 +11:00
Oliver Schneider
3cc5596466
Merge pull request #1433 from sinkuu/ref
...
Don't lint needless_borrow when matching `&&mut` by `&ref`
2017-01-10 17:29:19 +01:00
sinkuu
c9091b71a1
Don't lint when matching &&mut
by &ref
( Fix #1432 )
2017-01-11 00:42:58 +09:00
Manish Goregaokar
87db342304
run rustfmt
2017-01-09 23:56:13 -08:00
Oliver Schneider
e066997046
FOR_KV_MAP can now lint on mutable maps due to values_mut()
2017-01-10 08:33:20 +01:00
sinkuu
a2bcce9dbf
Move is_try
to util
...
Removed unnecessary condition
Also changed lint span of `try` from surrounded expression to entire `try`
invocation. It turned out that compiletest misses errors for macro invocations.
2017-01-07 23:52:48 +09:00
sinkuu
ce6e037ac5
Implement unused_io_amount
lint
2017-01-07 22:23:33 +09:00
Theemathas Chirananthavat
e4a4d0c361
Implement the forget_ref lint.
2017-01-05 17:41:01 -08:00
Theemathas Chirananthavat
f55d20ff46
Refactor drop_ref.rs to use the if_let_chain macro.
2017-01-05 17:41:01 -08:00
Oliver Schneider
f145fc44f8
Merge pull request #1414 from samueltardieu/no-short-circuit-if
...
Add a new "short_circuit_statement" lint (fixes #1194 )
2017-01-05 10:41:14 +01:00
Manish Goregaokar
9a301fd508
Bump to 0.0.106; Fix false positive in wrong_self_convention ( fix #1420 )
2017-01-04 18:05:04 -08:00
Manish Goregaokar
ab42f02003
Rerun rustfmt
2017-01-04 15:53:16 -08:00
Manish Goregaokar
2f941131bf
Bump to 1.105
2017-01-04 15:50:57 -08:00
Manish Goregaokar
b101611a97
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): Dogfood fixes
2017-01-04 15:50:57 -08:00
Manish Goregaokar
d6dd65620e
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): Fix self type
2017-01-04 15:50:54 -08:00
Manish Goregaokar
571369af1b
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): Borrow and spelling fixes
2017-01-04 15:50:50 -08:00
Manish Goregaokar
0437327976
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): More u128 fixes
2017-01-04 15:50:47 -08:00
Manish Goregaokar
e02fac4896
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): Recover patterns from arguments
2017-01-04 15:50:43 -08:00
Manish Goregaokar
a262e3bb0b
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): Eliminate has_self util
2017-01-04 15:50:37 -08:00
Josh Holmer
5aea0b2062
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): u128 fixes for rustup
2017-01-04 15:50:34 -08:00
Josh Holmer
64f5dbc9f8
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): Body fixes for rustup
2017-01-04 15:50:30 -08:00
Manish Goregaokar
f552f170db
Rustup to rustc 1.16.0-nightly ( 468227129
2017-01-03): Fix various type errors for rustup
2017-01-04 15:50:18 -08:00
Samuel Tardieu
82b2f5663f
Add a new "short_circuit_statement" lint ( fixes #1194 )
2016-12-31 01:17:39 +01:00
Manish Goregaokar
b8b54eb0d8
Fix suggestion span on new_without_default ( fixes #1407 )
2016-12-29 11:19:32 -08:00
Theemathas Chirananthavat
e1c540bfd1
Implement the double_parens lint.
2016-12-28 12:03:49 -08:00
Theemathas Chirananthavat
d76fa3dfd9
Add skeleton for double_parens lint.
2016-12-28 11:21:53 -08:00
Martin Carton
96d2483b09
Merge pull request #1400 from oli-obk/needed_needless_lifetime
...
support impl trait for needless lifetimes
2016-12-25 18:24:39 +01:00
Oliver Schneider
ba59ba3afc
fix rustfmt
2016-12-25 17:49:39 +01:00
Martin Carton
7c480d0db7
Merge pull request #1394 from Manishearth/absurd_extreme_comparisons_false_positive
...
fix absurd extreme comparisons false positive
2016-12-25 17:47:42 +01:00
Oliver Schneider
93333f0d7b
support impl trait for needless lifetimes
2016-12-22 15:51:59 +01:00
Oliver Schneider
2f219b827e
fix an ice related to associated types
...
fixes #1341
2016-12-22 14:16:07 +01:00
Oliver Schneider
0b10a41ef3
fix absurd extreme comparisons false positive
...
fixes #1387
2016-12-21 16:49:53 +01:00
Oliver Schneider
7a1d85f1de
Merge branch 'master' into allow_deprecated
2016-12-21 15:47:12 +01:00
Oliver Schneider
00a3bfb8eb
Don’t warn for types used in trait implementation
2016-12-21 15:42:20 +01:00
Oliver Schneider
90fc9c389f
split pub_enum_variant_names to new lint
2016-12-21 13:30:57 +01:00
Oliver Schneider
49e3419b87
shorten deprecated lints line length
2016-12-21 12:50:39 +01:00
Oliver Schneider
53fc09ec46
autogenerated functions are ignored by rustfmt
2016-12-21 12:40:56 +01:00
Oliver Schneider
009c6d95d7
manually fix the overlong lines
2016-12-21 12:30:41 +01:00
Oliver Schneider
47eead5ada
function definition style simplification
2016-12-21 12:14:54 +01:00
Oliver Schneider
ed9d71f2c9
remove nondeterminism by adjusting thresholds
2016-12-21 10:25:14 +01:00
Oliver Schneider
299d7be132
rustfmt fallout in doc comments
2016-12-21 10:00:13 +01:00
Oliver Schneider
44533f09aa
rustfmt round n
2016-12-21 09:45:24 +01:00
Oliver Schneider
4a4e1ea2c5
also run rustfmt on clippy-lints
2016-12-20 18:21:30 +01:00
mcarton
7dd3679ac3
Fix a couple warnings
2016-12-19 20:31:39 +01:00
Manish Goregaokar
d61c7fc747
Merge pull request #1355 from philipturnbull/deref-addrof
...
Lint usage of `*&` and `*&mut`
2016-12-19 03:35:45 -08:00
Oliver Schneider
5aded99033
don't lint on x = x + y inside an AddAssign impl
...
fixes #1302
2016-12-19 11:13:07 +01:00
mcarton
4fcefe2a9e
Bump to 0.0.104
2016-12-17 01:28:05 +01:00
Arnavion
3de6f9db20
Use inputs/output getters for rustc::ty::FnSig instead of the now non-existent fields.
2016-12-10 23:57:19 -08:00
Oliver Schneider
778ce4dfd3
update to the rust-PR that unblocks clippy
2016-12-07 13:13:40 +01:00
Oliver Schneider
c6e2967b9c
rustup to rustc 1.15.0-dev (3b248a184 2016-12-05)
2016-12-06 11:32:21 +01:00
mcarton
1ba8ed96cf
Fix dogfood
2016-12-02 22:33:16 +01:00
mcarton
65ff2df7e7
Fix copy lints
2016-12-02 22:23:24 +01:00
mcarton
fe15880beb
Revert "down to for-loops not comparing as equal"
...
This reverts commit cf1fa94be1
.
2016-12-02 20:54:05 +01:00
Oliver Schneider
8e1f6dce40
enum detection by style convention
2016-12-02 19:30:00 +01:00
Oliver Schneider
ff2487b30e
permit more equalities
2016-12-02 19:23:30 +01:00
Oliver Schneider
cf1fa94be1
down to for-loops not comparing as equal
2016-12-02 19:19:52 +01:00
Oliver Schneider
16aab71688
enum glob use
and copies
left
2016-12-02 17:38:31 +01:00
Wim Looman
919feaaec5
Allow allow(deprecated)
attribute on use
items
...
fixes #1372
2016-12-01 22:36:35 +01:00
Oliver Schneider
59b0077565
WIP compiles and doesn't crash (much) but tests are failing
2016-12-01 22:31:56 +01:00
Oliver Schneider
31e482403c
rustup to rustc 1.15.0-nightly ( d5814b03e
2016-11-23)
2016-11-25 19:24:55 +01:00
Phil Turnbull
0ee6128e27
Convert DEREF_ADDROF to EarlyLintPass
2016-11-25 10:33:21 -05:00
Martin Carton
11ca07c8ad
Merge pull request #1360 from Manishearth/rustup
...
Rustup to *rustc 1.15.0-nightly (3bf2be9ce
2016-11-22)* and bump to 0.0.102
2016-11-24 18:12:20 +01:00
Oliver Schneider
9717b9585d
Merge pull request #1363 from hdhoang/patch-2
...
useless_format: fix typo
2016-11-24 11:20:52 +01:00
Hoàng Đức Hiếu
f5ccc2fe6f
useless_format: fix typo
2016-11-24 16:10:22 +07:00
Hoàng Đức Hiếu
4215292793
let_if_seq: fix rewrite example
2016-11-24 16:09:09 +07:00
mcarton
9a92ed4e3e
Bump to 0.0.102
2016-11-23 22:45:00 +01:00
mcarton
c7e3cc1e27
Rustup to *rustc 1.15.0-nightly ( 3bf2be9ce
2016-11-22)*
2016-11-23 22:44:00 +01:00
mcarton
338690b4e9
Bump to 0.0.101
2016-11-23 21:31:59 +01:00
mcarton
c35f82b823
Rustup to *rustc 1.15.0-nightly ( 7b3eeea22
2016-11-21)*
2016-11-23 21:31:55 +01:00
Phil Turnbull
a9f5b90f0f
Lint usage of *&
and *&mut
...
fixes #1316
2016-11-22 21:06:20 -05:00
Martin Carton
530083c3b9
Merge pull request #1349 from philipturnbull/extend-chars
...
Lint `.extend(s.chars())` (closes #792 )
2016-11-22 18:21:30 +01:00
Phil Turnbull
8705f3d11c
Remove mention of .push_str(s)
being faster
...
For the `.push_str(str.chars())` case the compiler will inline `push_str` and
call `extend_from_slice` on the underlying vector, so this isn't actually
faster.
2016-11-20 17:28:14 -05:00
Phil Turnbull
e9f3911899
Suggest &s
instead of s.as_str()
2016-11-20 11:19:36 -05:00
sinkuu
5d40965b50
Fix #1346
2016-11-20 10:15:40 +09:00
sinkuu
1973e94550
Allow explicit returns with cfg attributes
2016-11-20 10:02:41 +09:00
mcarton
40fcae112d
Bump to 0.0.100
2016-11-20 00:14:25 +01:00
mcarton
be799bc085
Rustup to *rustc 1.15.0-nightly ( ac635aa95
2016-11-18)*
2016-11-20 00:13:08 +01:00
Phil Turnbull
73a73638c0
Add lint for string.extend(string.chars())
...
fixes #792
2016-11-19 14:55:47 -05:00
Phil Turnbull
fa78b09fa7
Add lint for string.extend("str".chars())
...
fixes #792
2016-11-19 14:55:02 -05:00
Phil Turnbull
0ab7e6c598
Factor out lint_vec_extend
2016-11-19 14:44:32 -05:00
mcarton
1176242b72
Rustup to rustc 1.15.0-nightly ( 0ed951993
2016-11-14)
2016-11-18 13:40:53 +01:00
mcarton
7140eac484
Cleanup
2016-11-18 13:40:44 +01:00
Oliver Schneider
f39c6278e1
fix the inspector
2016-11-18 13:21:07 +01:00
mcarton
945c027768
Handle closure with single expression blocks
2016-11-17 19:44:18 +01:00
mcarton
19c5f5394b
Rustup to rustc 1.15.0-nightly ( 0ed951993
2016-11-14)
2016-11-16 23:05:26 +01:00
Sébastien Santoro
0e6807e86b
Recognize quux as a metasyntactic variable
...
quux is another metasyntactic variable like foo and so
should be detected by the blacklisted names linter.
2016-11-11 05:57:29 +01:00
Oliver 'ker' Schneider
cfae1e9fda
fix ice in len_zero
lint when type has no inherent impls at all
...
fixes #1336
2016-11-10 17:06:39 +01:00
Oliver Schneider
a260e65ead
Merge pull request #1312 from devonhollowood/get-unwrap
...
Implement `get_unwrap` lint
2016-11-09 09:49:20 +01:00
Oliver 'ker' Schneider
e8783be6f1
version bump
2016-11-08 11:44:55 +01:00
Oliver 'ker' Schneider
ea1d432f66
publish 0.97
2016-11-03 21:23:49 +01:00
Devon Hollowood
e94a4d4666
Fix suggestion in get_unwrap
lint
2016-11-02 11:48:16 -07:00
Oliver Schneider
a56af73fd8
mark cyclomatic complexity attribute as used
...
fixes #1315
2016-11-02 10:29:57 +01:00
Devon Hollowood
6a14dc7fd4
Remove false positives from get_unwrap
lint
...
HashMap and BTreeMap don't implement `IndexMut`, so we shouldn't lint
for use of `get_mut().unwrap()` for those types.
2016-11-01 17:48:32 -07:00
Devon Hollowood
4e0d182d1d
Clean up get_unwrap
code
2016-11-01 17:48:18 -07:00
Devon Hollowood
c5e270a1aa
Small fixes for get_unwrap
lint
2016-11-01 01:08:38 -07:00
Devon Hollowood
cfc741405b
Run update_lints.py
2016-10-31 23:43:19 -07:00
Devon Hollowood
0680ac3562
Add get_unwrap
lint
2016-10-31 23:42:33 -07:00
Gibson Fahnestock
c40466e1c2
Add to docs for if_let_some_result
2016-10-31 22:55:22 +00:00
Oliver Schneider
053896b678
Merge pull request #1307 from Kha/partialeq_ne
...
Implement 'Re-implementing `PartialEq::ne`' lint
2016-10-31 09:06:14 -04:00
Sebastian Ullrich
9314965af0
inspector: fix printing non-local trait refs
2016-10-30 15:00:59 -04:00
Sebastian Ullrich
8664d03ec6
implement 'Re-implementing PartialEq::ne
' lint
...
closes #86
2016-10-30 15:00:59 -04:00
Oliver Schneider
8b2e80b47b
Merge pull request #1299 from Manishearth/clippy-toml
...
Search for `clippy.toml` recursively
2016-10-30 14:35:32 -04:00
Sebastian Ullrich
90f71be4e9
factor out is_automatically_derived
util fn
2016-10-30 14:25:06 -04:00
d-dorazio
d213040381
Add lint for redundant pattern matching in iflet for Result/Option
2016-10-30 15:43:46 +01:00
Devon Hollowood
3a0d342a33
Fix false positive for wrong_self_convention
2016-10-27 01:11:34 -07:00
mcarton
d52af53e04
Search for clippy.toml
recursively
2016-10-25 19:41:24 +02:00
Oliver Schneider
233459ea33
clean up docs for clippy_dump
2016-10-24 16:30:22 +02:00
Oliver Schneider
34deb72c36
properly name the docs
2016-10-24 15:43:37 +02:00
Oliver Schneider
ed50cb133d
dogfood
2016-10-24 15:16:21 +02:00
Oliver Schneider
6a6dfa59da
factor out decl dumping
2016-10-24 14:29:09 +02:00
Oliver Schneider
1248159f0d
add expression and pattern dump
2016-10-24 14:28:58 +02:00
Oliver Schneider
f29ab8c245
Merge branch 'master' of github.com:Manishearth/rust-clippy into deep_code_inspection
2016-10-24 10:39:19 +02:00
Arnavion
2315a817ce
Changed signature of cargo::metadata according to review comment.
2016-10-23 12:24:16 -07:00
Arnavion
ebbd00b1ab
Don't assume the first package in the result of cargo metadata
is the current crate.
...
Instead find the one with the manifest path that matches the --manifest-path argument or the current directory.
Fixes #1247
2016-10-22 18:15:42 -07:00
mcarton
6960c506ef
Fix unused import warning
2016-10-22 16:16:38 +02:00
mcarton
ceb50872ce
Bump to 0.0.96
2016-10-22 16:00:17 +02:00
mcarton
1c3fce41b6
Rustup to *rustc 1.14.0-nightly ( f09420685
2016-10-20)*
2016-10-22 15:57:19 +02:00
Oliver Schneider
a177d85681
rename inspection attribute to clippy_dump
2016-10-18 17:29:01 +02:00
Oliver Schneider
ff3efc759e
initial implementation of the code inspector lint
2016-10-18 16:57:39 +02:00
mcarton
4cf87a9d49
Remove the now stable #[feature(question_mark)]
2016-10-16 14:01:55 +02:00
d-dorazio
62831c6e29
Suggest nth(X)
instead of skip(X).next()
2016-10-14 13:38:00 +02:00
Patrick Horlebein
4fbd8906e1
doc_markdown: Added "iOS" and "macOS" to the doc-valid-idents list
2016-10-12 15:32:44 +02:00
d-dorazio
a4d4a372e0
Avoid redundant multiple pattern suggested when one pattern is _
2016-10-08 16:29:19 +02:00
mcarton
47c2271497
Fix FP with print_with_newline
and final arguments
2016-10-06 22:30:03 +02:00
mcarton
a4035aabf3
Bump to 0.0.95
2016-10-06 17:52:41 +02:00
mcarton
fc09eb553e
Fix dogfood problem
2016-10-06 17:50:11 +02:00
mcarton
0475eae1fa
Rustup to *rustc 1.14.0-nightly ( 3210fd5c2
2016-10-05)*
2016-10-06 17:46:50 +02:00
Martin Carton
e851bc7404
Merge pull request #1257 from KitFreddura/master
...
If let some lint
2016-10-04 23:00:05 +02:00
Manish Goregaokar
85e37795b9
Merge pull request #1262 from Manishearth/rustup
...
Remove warning in the latest nightly
2016-10-04 21:04:20 +05:30
mcarton
2b8500664c
Remove warning in the lastest nightly
2016-10-04 17:17:40 +02:00
Manish Goregaokar
ec93ae10e0
Bump to 0.0.94
2016-10-04 09:17:09 +05:30
mcarton
1c035f7cf9
Bump to 0.0.93
2016-10-03 21:26:25 +02:00
mcarton
4f91d66905
Rustup to *rustc 1.14.0-nightly ( 144af3e97
2016-10-02)*
2016-10-03 21:25:27 +02:00
Manish Goregaokar
a4198c1108
Merge pull request #1255 from Manishearth/cov
...
Improve test coverage
2016-10-03 22:15:23 +05:30
Kit Freddura
c8aa35e150
replaced snippet_opt with snippet for more terse code
2016-10-02 14:38:31 -07:00
Kit Freddura
97e9299a10
fixed array bounds checking
2016-10-02 14:26:41 -07:00
Kit Freddura
3573114764
replaced pat_to_string with snippet
2016-10-02 14:15:24 -07:00
Kit Freddura
1188f59102
fixed struct elison
2016-10-02 13:53:10 -07:00
Kit Freddura
c18dc13f6e
added file again
2016-10-02 13:48:52 -07:00
Kit Freddura
d152ca04bd
updated zero_div_zero.rs
2016-10-02 13:44:23 -07:00
Kit Freddura
ab9435a6d4
ran update
2016-10-02 13:42:11 -07:00
Kit Freddura
1c15428339
removed formatting changes
2016-10-02 13:39:28 -07:00
Andre Bogus
8188c46429
Allow option_map_unwrap_or(_else)
...
This fixes #1192 .
2016-10-02 21:23:26 +02:00
mcarton
d982b19a0e
Fix slightly wrong comment
2016-10-02 14:30:21 +02:00
mcarton
f03bac6c3a
Remove a useless method
2016-10-02 02:47:53 +02:00
mcarton
e50cfa7e77
Add a test for a shadow
corner case
2016-10-02 02:38:54 +02:00
mcarton
9a3f53dee6
Partially hash let
declaration in SpanlessHash
...
The hash never needs to be good but before it was simply doing nothing
for these.
2016-10-02 02:17:04 +02:00
mcarton
e036a8145a
Support ExprType
(type ascription) comparison
...
*ish
2016-10-01 22:26:57 +02:00
mcarton
3e009b9424
Implement more hir
typed node comparison
2016-10-01 22:19:20 +02:00
Martin Carton
8babb2d409
Merge pull request #1250 from elliottneilclark/explicit_into_iter
...
Add a lint to warn about un-necessary .into_iter()
2016-10-01 15:01:43 +02:00
Oliver Schneider
9c5d3f3b85
correctly traverse match expressions for diverging_sub_expr
2016-10-01 14:41:20 +02:00
Elliott Clark
4a34087c77
Run util/update_lints.py after adding explicit_into_iter_loop
2016-09-30 17:50:02 -07:00
Elliott Clark
5fa004313b
Add a lint to warn about un-necessary .into_iter()
...
This should close #1094 .
2016-09-30 17:42:43 -07:00
mcarton
ee5a5a256f
Bump to 0.0.92
2016-09-30 22:07:01 +02:00
mcarton
ec27062bb6
Bump to 0.0.91
2016-09-28 01:10:50 +02:00
mcarton
4f3920307a
Rustup to *rustc 1.13.0-nightly ( d0623cf7b
2016-09-26)*
2016-09-28 01:09:11 +02:00
mcarton
f74dcaac0c
Fix wrong suggestion in TRANSMUTE_PTR_TO_REF
with lts
2016-09-19 17:59:12 +02:00
mcarton
5f1120b346
Fix markup in SINGLE_CHAR_PATTERN
documentation
2016-09-18 18:27:08 +02:00
Takuma YOSHIOKA
7b6a60ca69
Fix typo in example codes of "matches" lints
...
Use `=>` for match arms (instead of wrong `->`).
2016-09-18 20:17:25 +09:00
mcarton
c8986b4676
Fix FP with WHILE_LET_ON_ITERATOR
and refutable pats
2016-09-16 15:50:35 +02:00
mcarton
90c390ec2a
Fix typo
...
Who cares? Meh, consistency.
2016-09-16 15:45:19 +02:00
Martin Carton
dc84759ac5
Merge pull request #1224 from oli-obk/divergence
...
lint diverging expressions that are sub-expressions of others
2016-09-13 15:58:31 +02:00
Oliver Schneider
e6bfe4b514
also lint diverging methods
2016-09-13 12:41:37 +02:00
Oliver Schneider
a2257280ec
don't lint expressions referencing !
objects, just expressions creating them
2016-09-13 12:41:20 +02:00
Oliver Schneider
12a82b2007
also lint private modules for module_inception, as that is the main issue
2016-09-13 10:19:55 +02:00
Oliver Schneider
f469860dc2
lint diverging expressions that are sub-expressions of others
2016-09-12 14:24:11 +02:00
Oliver Schneider
03fa974855
Let the submodule #[allow]
in module_inception
2016-09-12 10:30:42 +02:00
mcarton
7279dc3edf
Bump to 0.0.90
2016-09-10 19:13:55 +02:00
mcarton
ab6669a641
Rustup to *rustc 1.13.0-nightly ( f1f40f850
2016-09-09)*
2016-09-10 19:13:49 +02:00
mcarton
9263ec3616
Bump to 0.0.89
2016-09-06 19:05:53 +02:00
mcarton
e9ba9ec1a2
Bump to 0.0.88
2016-09-04 17:50:14 +02:00
mcarton
b82f43f38e
Revert "Remove all union
stuffs"
...
This reverts commit 888c34ad70
.
This rustups to rustc 1.13.0-nightly (70598e04f
2016-09-03).
2016-09-04 17:45:36 +02:00
mcarton
b2de244cfd
Restrict len_without_is_empty
to exported items
2016-09-02 15:30:06 +02:00
kennytm
5f09020e90
Added a lint_without_lint_pass lint.
...
Four lints were missing from LintPass, making them unavailable unless the
`clippy` lint group is explicitly enabled:
* `for_loop_over_result`
* `for_loop_over_option`
* `match_overlapping_arm`
* `filter_next`
2016-09-01 15:07:37 +08:00
mcarton
377fec7c9a
Bump to 0.0.87
2016-08-31 18:22:36 +02:00
mcarton
888c34ad70
Remove all union
stuffs
...
The rustc's PR wasn't merged. Hopefully this commit can simply be reverted when it's time.
2016-08-31 18:22:36 +02:00
mcarton
01424f5622
Support unions here and there
2016-08-31 18:22:36 +02:00
mcarton
3f43996aa5
Rustup to *1.13.0-nightly ( eac41469d
2016-08-30)*
2016-08-31 18:22:35 +02:00
mcarton
d87f137254
Add a builtin_type_shadow
lint
2016-08-28 19:56:18 +02:00
mcarton
e922fa80ce
Fix FP in ZERO_PREFIXED_LITERAL
and 0b
/Oo
2016-08-28 18:00:09 +02:00
mcarton
f3062f4199
Bump to 0.0.86
2016-08-28 17:26:45 +02:00
mcarton
189c5e5cfc
Rustup to rustc 1.13.0-nightly ( a23064af5
2016-08-27)
2016-08-28 17:25:58 +02:00
mcarton
e338f6a4f0
Remove now useless attribute type_macros
2016-08-28 17:24:34 +02:00
Andre Bogus
06235b0310
refactored misc to reduce passes
...
related to #1062
Before: 960MB After: 956MB
So while this reduces code size somewhat, I don't see much memory
improvement here. Still, it's probably worthwile to consider reducing
our passes at least within modules.
2016-08-24 21:47:46 +02:00
mcarton
ddf84ea845
Fix typos
2016-08-24 14:37:09 +02:00
mcarton
be329ebdf7
Typo
...
TIL what `wether` means.
2016-08-23 19:51:42 +02:00
mcarton
9a2aadf872
Deny missing_docs_in_private_items
in some modules
2016-08-23 19:39:36 +02:00