Guillem Nieto
e0ccc9d9af
Add slow zero-filled vector initialization lint
...
Add lint to detect slow zero-filled vector initialization. It detects
when a vector is zero-filled with extended with `repeat(0).take(len)`
or `resize(len, 0)`.
This zero-fillings are usually slower than simply using `vec![0; len]`.
2018-11-25 14:34:23 -08:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
69d09fbfc6
Merge pull request #3439 from dtolnay/npbv
...
Downgrade needless_pass_by_value to allow by default
2018-11-24 10:16:38 +01:00
Philipp Hansch
3e68a89dd0
Merge pull request #3453 from phansch/remove_sudo_false
...
Travis: Remove `sudo: false`
2018-11-23 22:13:50 +01:00
Philipp Hansch
ce4f3010ec
Travis: Remove sudo: false
2018-11-23 21:47:02 +01:00
Philipp Hansch
754b4c0723
Merge pull request #3452 from matthiaskrgr/rustup
...
rustup https://github.com/rust-lang/rust/pull/54071/
2018-11-23 10:38:20 +01:00
Matthias Krüger
311c8e29b1
rustup https://github.com/rust-lang/rust/pull/54071/
2018-11-23 10:05:51 +01:00
Philipp Hansch
61501b2810
Merge pull request #3449 from matthiaskrgr/dep
...
dependencies: update pulldown-cmark from 0.1 to 0.2
2018-11-22 18:54:09 +01:00
Matthias Krüger
1ee0c1a029
dependencies: update pulldown-cmark from 0.1 to 0.2
2018-11-22 18:04:34 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
ff7da3264e
Merge pull request #3447 from phansch/small_rename
...
s/file_map/source_map
2018-11-22 15:08:13 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
2f6881c623
Merge pull request #3442 from rust-lang/version_ids
...
Enable rustup clippy to refer to the correct documentation
2018-11-22 10:46:08 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
87ec0580f9
Merge branch 'master' into version_ids
2018-11-22 10:22:25 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
42da194c2c
Merge pull request #3446 from matthiaskrgr/url_update
...
update urls (rust-lang-nursery => rust-lang)
2018-11-22 09:38:56 +01:00
Philipp Hansch
c4b08a5b0c
s/file_map/source_map
2018-11-22 07:53:59 +01:00
Matthias Krüger
0b8d323304
missed another one in the README
2018-11-22 04:50:00 +01:00
Matthias Krüger
d48af43cdf
run "util/dev update_lints"
2018-11-22 04:43:33 +01:00
Matthias Krüger
f5929e0797
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy
2018-11-22 04:40:09 +01:00
bors[bot]
1d5108c264
Merge #3437
...
3437: issue #3318 Run trivially_copy_pass_by_ref for traits r=flip1995 a=waynr
Addresses #3318
Co-authored-by: Wayne Warren <wayne.warren.s@gmail.com>
Co-authored-by: Philipp Krones <hello@philkrones.com>
2018-11-21 15:04:11 +00:00
bors[bot]
dfbc926b70
Merge #3443
...
3443: Document how to lint local Clippy changes with locally built Clippy r=flip1995 a=waynr
Co-authored-by: Wayne Warren <wayne.warren.s@gmail.com>
2018-11-21 14:11:24 +00:00
Wayne Warren
1fed72bad4
Address 'clippy::single-match' dogfood lint
2018-11-21 07:52:02 -06:00
Philipp Krones
d4a6ee4a0c
Fix nit
...
Co-Authored-By: waynr <wayne.warren.s@gmail.com>
2018-11-21 07:52:02 -06:00
Wayne Warren
cb5e327c58
Address travis CI lint failure
2018-11-21 07:52:02 -06:00
Wayne Warren
ca4803101f
Update trivially_copy_pass_by_ref with Trait stderr output
2018-11-21 07:52:02 -06:00
Wayne Warren
92f7f9061c
issue#3318 run trivially_copy_pass_by_ref for traits
2018-11-21 07:52:02 -06:00
Wayne Warren
67c32eb2c4
Update trivially_copy_pass_by_ref with Trait examples
2018-11-21 07:52:02 -06:00
Wayne Warren
4450b3e47a
Fix awkward wording
2018-11-21 07:16:03 -06:00
Wayne Warren
30b3bc8d80
Document how to lint local Clippy changes with locally built Clippy
2018-11-21 07:12:00 -06:00
bors[bot]
70ca052397
Merge #3441
...
3441: rustup https://github.com/rust-lang/rust/pull/52591 r=flip1995 a=matthiaskrgr
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
2018-11-21 12:42:57 +00:00
Oliver Scherer
617d861041
Enable rustup clippy to refer to the correct documentation
2018-11-21 13:33:42 +01:00
Matthias Krüger
4aae76464c
rustup https://github.com/rust-lang/rust/pull/52591
2018-11-21 13:29:23 +01:00
David Tolnay
e4be2b4e64
Downgrade needless_pass_by_value to allow by default
...
I noticed that I suppress this lint in many of my projects.
https://github.com/search?q=needless_pass_by_value+user%3Adtolnay&type=Code
https://github.com/search?q=needless_pass_by_value+user%3Aserde-rs&type=Code
Upon further inspection, this lint has a *long* history of false
positives (and several remaining).
Generally I feel that this lint is the definition of pedantic and should
not be linted by default.
#[derive(Debug)]
enum How {
ThisWay,
ThatWay,
}
// Are we really better off forcing the call sites to write f(&_)...?
fn f(how: How) {
println!("You want to do it {:?}", how);
}
fn main() {
f(How::ThatWay);
}
2018-11-21 03:11:22 -08:00
bors[bot]
64ff255ac6
Merge #3432
...
3432: match_ref_pats: don't emit suggestions inside of a macro r=Manishearth a=flip1995
Fixes #2636
Co-authored-by: flip1995 <hello@philkrones.com>
2018-11-19 21:07:49 +00:00
bors[bot]
0abbc38730
Merge #3435
...
3435: remove unused allow() attributes, NFC r=flip1995 a=matthiaskrgr
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
2018-11-17 15:24:10 +00:00
Matthias Krüger
3a11cd4289
remove unused allow() attributes, NFC
2018-11-17 13:47:46 +01:00
bors[bot]
f5d868c9ed
Merge #3431
...
3431: rustup https://github.com/rust-lang/rust/pull/55852/ r=flip1995 a=matthiaskrgr
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
2018-11-15 16:10:48 +00:00
flip1995
655a2b4709
Add regression test
2018-11-15 17:06:36 +01:00
flip1995
1000fc5120
Don't emit suggestion when inside of a macro
2018-11-15 17:03:17 +01:00
Matthias Krüger
2d0d41ff29
rustup https://github.com/rust-lang/rust/pull/55852/
2018-11-15 16:50:28 +01:00
bors[bot]
a2c9d10da5
Merge #3419
...
3419: Linter to check that all common metadata is included r=flip1995 a=ysimonson
Addresses https://github.com/rust-lang-nursery/rust-clippy/issues/1793
This is not ready to be merged yet. First the associated changes to `cargo_metadata` need to be merged: https://github.com/oli-obk/cargo_metadata/pull/55
Co-authored-by: Yusuf Simonson <simonson@gmail.com>
2018-11-15 14:18:12 +00:00
bors[bot]
7e0ddef4e7
Merge #3428
...
3428: Typo "too" -> "foo" in format.rs r=matthiaskrgr a=ama0
Co-authored-by: Anton <ama0@users.noreply.github.com>
2018-11-14 13:24:45 +00:00
Anton
93324f1acf
Fix "too" -> "foo" typo in format.rs
2018-11-14 14:08:52 +01:00
bors[bot]
973e70cef7
Merge #3427
...
3427: Fix wrong suggestion for `redundant_closure_call` r=oli-obk a=mikerite
Fixes #1684
Co-authored-by: Michael Wright <mikerite@lavabit.com>
2018-11-14 08:57:32 +00:00
Michael Wright
3ba4c3a9b1
Fix use_self
violation
2018-11-14 08:43:35 +02:00
Michael Wright
e2e892b59b
Fix wrong suggestion for redundant_closure_call
...
Fixes #1684
2018-11-14 08:01:39 +02:00
Yusuf Simonson
866caabb7a
Check for common metadata
2018-11-13 08:43:30 -05:00
bors[bot]
6cc502dda0
Merge #3426
...
3426: Fix `use_self` false positive on `use` statements r=flip1995 a=mikerite
Fixes #3425
Co-authored-by: Michael Wright <mikerite@lavabit.com>
2018-11-13 12:57:20 +00:00
Michael Wright
5ade9ff44e
Fix use_self
false positive on use
statements
2018-11-13 06:15:33 +02:00
bors[bot]
82044946cd
Merge #3423
...
3423: Fix `use_self` false positive r=flip1995 a=mikerite
This fixes the first error reported in issue #3410 .
Co-authored-by: Michael Wright <mikerite@lavabit.com>
2018-11-10 13:16:35 +00:00
Michael Wright
460c2b317b
Fix use_self
false positive
...
This fixes the first error reported in issue #3410 .
2018-11-10 10:57:11 +02:00
bors[bot]
3bb88775de
Merge #3407
...
3407: Fix `possible_missing_comma` false positives r=oli-obk a=mikerite
`possible_missing_comma` should only trigger when the binary operator has
unary equivalent. Otherwise, it's not possible to insert a comma without
breaking compilation. The operators identified were `+`, `&`, `*` and `-`.
This fixes the specific examples given in issues #3244 and #3396
but doesn't address the conflict this lint has with the style of starting
a line with a binary operator.
Co-authored-by: Michael Wright <mikerite@lavabit.com>
2018-11-07 07:16:43 +00:00
Michael Wright
c20e17f8ee
Remove +
from has_unary_equivalent
...
Rust doesn't has a unary + operator!
2018-11-06 07:05:13 +02:00