Iain Brandram-Adams
454ed47acf
Update comment in conf.rs
2020-06-14 12:46:56 +12:00
Teddy_Wang
40ee620e51
Added a lint for .map(|x| x)
2020-06-13 10:08:12 -04:00
Iain Brandram-Adams
f663a21c8f
Remove bar
from blacklisted names
2020-06-14 01:24:36 +12:00
Bastian Kauschke
dee794f450
typo
2020-06-13 12:42:58 +02:00
Lzu Tao
994a839622
Stabilize Option::zip
2020-06-13 01:27:18 +00:00
Eduardo Broto
b21ef2b365
Fix ICE in consts::binop
2020-06-13 00:52:32 +02:00
Dylan DPC
7c15f30701
Rollup merge of #72906 - lzutao:migrate-numeric-assoc-consts, r=dtolnay
...
Migrate to numeric associated consts
The deprecation PR is #72885
cc #68490
cc rust-lang/rfcs#2700
2020-06-12 12:28:23 +02:00
Matthew Jasper
af9b09235c
Remove ImplItemKind::OpaqueTy from clippy
2020-06-11 16:24:01 +01:00
Matthew Jasper
857ea16feb
Remove associated opaque types
...
They're unused now.
2020-06-11 16:24:01 +01:00
David Tolnay
56f25e3e62
Downgrade unnested_or_patterns to pedantic
2020-06-10 19:29:11 -07:00
Aaron Hill
e2e2a0fa83
Clippy fixes
2020-06-10 17:30:12 -04:00
Aaron Hill
6b3ee8f600
Update Clippy for MethodCall changes
2020-06-10 17:30:11 -04:00
Lzu Tao
c9bd35cac3
Migrate to numeric associated consts
2020-06-10 01:35:47 +00:00
Eduardo Broto
2f74283fce
Add a comment linking to the issue
2020-06-10 00:14:02 +02:00
Eduardo Broto
a083b84b78
if_same_then_else: don't assume multiplication is always commutative
2020-06-09 23:49:21 +02:00
Devin R
e521a4ed38
Add enough attrs to the test file so the fix compiles with no errors, fmt/clippy
2020-06-09 16:39:31 -04:00
Lzu Tao
8db24840f7
Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy
2020-06-09 14:36:01 +00:00
Devin R
288df59b25
Fix suggestion output, add run-rustfix to test file, stop sorting import segments duh
2020-06-08 16:00:33 -04:00
Devin R
8c5a5a92ec
cleaned up import suggestion formatter, look into code reuse with wildcard impotrs
2020-06-08 16:00:33 -04:00
Devin R
d4f60b5ff4
wip: of handling nested import paths for multi-macro paths
2020-06-08 16:00:33 -04:00
Devin R
451363dc59
still working on displaying nested imports
2020-06-08 16:00:33 -04:00
Devin R
8bc106b29d
fix some of the review, rename, fmt, refactor
2020-06-08 16:00:33 -04:00
Devin R
1d9e80ad7b
remove session
2020-06-08 16:00:33 -04:00
Devin R
8ffbf6f94d
use hashset not map for keeping track of seen macro refs
...
remove stdout, fix clippy warnings, fmtcar
2020-06-08 16:00:33 -04:00
Devin R
ede366be63
collected all the imports and names
...
how to compare macro to import path
add more imports to test
2020-06-08 16:00:30 -04:00
Devin R
a4b8bb88f2
warn on macro_use attr
...
cargo dev update lints
use if_chain
clean up alot, span_lint_and_sugg
find imported macros for sugg
2020-06-08 15:59:41 -04:00
bors
ff0993c5e9
Auto merge of #5692 - ebroto:5689_N_dotdot_N, r=yaahc
...
reversed_empty_ranges: avoid linting N..N except in for loop arguments
changelog: [`reversed_empty_ranges`]: avoid linting N..N except in for loop arguments
r? @yaahc
Fixes #5689
2020-06-08 17:15:45 +00:00
bors
f947644f0d
Auto merge of #5680 - ebroto:3792_let_return, r=Manishearth
...
let_and_return: avoid "does not live long enough" errors
EDIT: Add #3324 to the list of fixes
<details>
<summary>Description of old impl</summary>
<br>
Avoid suggesting turning the RHS expression of the last statement into the block tail expression if a temporary borrows from a local that would be destroyed before.
This is my first incursion into MIR so there's probably room for improvement!
</details>
Avoid linting if the return type of some method or function called in the last statement has a lifetime parameter.
changelog: Fix false positive in [`let_and_return`]
Fixes #3792
Fixes #3324
2020-06-08 16:47:22 +00:00
flip1995
a9ca832b11
Fix rebase fallout
2020-06-07 21:37:55 +02:00
flip1995
ecabed67ec
Apply self-review by Centril
2020-06-07 21:16:05 +02:00
Mazdak Farrokhzad
78f158e80e
dogfood unnested_or_patterns
2020-06-07 21:16:03 +02:00
Eduardo Broto
a664ce7789
Remove unnecessary lifetime parameter
2020-06-07 21:13:13 +02:00
Mazdak Farrokhzad
7b6dc7b33d
add unnested_or_patterns
lint
2020-06-07 21:09:47 +02:00
Eduardo Broto
ebfc1da07d
reversed_empty_ranges: don't lint N..N except in for loop arg
2020-06-07 21:03:08 +02:00
Eduardo Broto
dac8a3c1ca
let_and_return: do not lint if last statement borrows
2020-06-07 20:53:38 +02:00
Eduardo Broto
dc13016ac2
Make let_and_return a late lint pass
2020-06-07 20:53:38 +02:00
flip1995
1a8a69d012
Merge remote-tracking branch 'upstream/master' into rustup
2020-06-07 02:17:49 +02:00
Ralf Jung
161474b7f7
Rollup merge of #72508 - ecstatic-morse:poly-self-ty, r=nikomatsakis
...
Make `PolyTraitRef::self_ty` return `Binder<Ty>`
This came up during review of #71618 . The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of #72507 .
2020-06-06 21:57:38 +02:00
Philipp Hansch
623faac84e
Cleanup: Use rustc's same_types
instead of our same_tys
2020-06-06 11:50:59 +02:00
bors
b059c0a2e6
Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum
...
Rename all remaining compiler crates to use the `rustc_foo` pattern
libarena -> librustc_arena
libfmt_macros -> librustc_parse_format
libgraphviz -> librustc_graphviz
libserialize -> librustc_serialize
Closes https://github.com/rust-lang/rust/issues/71177 in particular.
2020-06-06 09:00:51 +00:00
Eduardo Broto
413713c884
Add error info when cargo metadata fails to run
2020-06-05 22:28:58 +02:00
Matthias Krüger
7654125d27
match_wildcard_for_single_variants: remove empty line at start of lint example.
...
See https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
changelog: none
2020-06-04 03:34:22 +02:00
Mark Rousskov
0c470b3339
Bump to 1.46
2020-06-03 15:27:51 -04:00
Lzu Tao
b39fd5f62f
Fix false negative of checked_conversion lint
2020-06-03 09:04:24 +07:00
Vadim Petrochenkov
bd3fc11416
Update fulldeps tests and clippy
2020-06-03 00:18:57 +03:00
Vadim Petrochenkov
2b79413491
Rename the crates in source code
2020-06-02 20:42:54 +03:00
bors
6c833df69b
Auto merge of #5678 - lzutao:slice, r=flip1995
...
Make use of slice pattern
changelog: none
2020-06-02 16:42:51 +00:00
Lzu Tao
fbf0b84b32
Make use of slice pattern
2020-06-02 21:42:33 +07:00
bors
5cb9ef390a
Auto merge of #5664 - ThibsG:GiveCorrectedCode, r=flip1995
...
Give corrected code
This PR adds corrected code for doc examples.
I did this in several commits to facilitate review.
Don't hesitate to tell me if I forgot some.
Also, sometimes I felt it was not necessary to give corrected code, but I maybe wrong.
fixes : #4829
changelog: Improve documentation examples across multiple lints.
2020-06-02 12:11:28 +00:00
bors
f760d77bdb
Auto merge of #5597 - esamudera:slice_iter_next, r=flip1995
...
New lint: iter_next_slice
Hello, this is a work-in-progress PR for issue: https://github.com/rust-lang/rust-clippy/issues/5572
I have implemented lint to replace `iter().next()` for `slice[index..]` and `array` with `get(index)` and `get(0)` respectively. However since I made a lot of changes, I would like to request some feedback before continuing so that I could fix mistakes.
Thank you!
---
changelog: implement `iter_next_slice` lint and test, and modify `needless_continues`, `for_loop_over_options_result` UI tests since they have `iter().next()`
2020-06-02 11:42:22 +00:00