Matthias Krüger
d618637c05
Rustup to rustc 1.36.0-nightly (13fde05b1 2019-05-03)
2019-05-03 22:28:34 -07:00
Philipp Hansch
1f5a3c6e52
Rustup for https://github.com/rust-lang/rust/pull/59042
2019-04-25 07:29:23 +02:00
Manish Goregaokar
7e2043de2f
Ignore all enum and struct constructors in lints about *or(call())
2019-04-23 08:01:42 -07:00
Philipp Hansch
850c24edd3
Fix false positive in module_name_repetitions lint
...
This lint was triggering on modules inside expanded attrs, like
for example `#[cfg(test)]` and possibly more.
2019-04-19 12:53:03 +02:00
flip1995
840eac2c05
Use {get,match}_def_path from LateContext
2019-04-17 12:53:29 +02:00
flip1995
2f100e04af
Remove uplifted functions {get,match}_def_path from Clippy
2019-04-17 12:51:57 +02:00
Manish Goregaokar
2156f6733e
Clean up unused cx parameters
2019-04-14 13:23:43 -07:00
Manish Goregaokar
1b2f2be085
Remove now-unnecessary calls to node_to_hir_id
2019-04-14 13:11:31 -07:00
flip1995
3fe5eea4e4
Fix get_def_path
...
This fix is obsolet once rust-lang/rust#59779 and #3926 is merged.
2019-04-12 11:59:06 +02:00
Tomas Koutsky
603996c9d5
Support updated type dependent def ID getter
2019-04-10 16:18:02 +02:00
flip1995
bbb7963735
Fix dogfood error of question_mark lint fix
2019-04-01 20:37:05 +02:00
flip1995
6f01ecfefd
Fix question_mark lint+test
2019-04-01 20:37:05 +02:00
Oliver Scherer
d020565ed2
Hacky rustup
2019-03-26 10:55:03 +01:00
Mateusz Mikuła
6cb0605600
Cargo fmt
2019-03-18 13:39:11 +01:00
Mateusz Mikuła
cb3aa7480c
Fix path_qualified
...
As suggested by eddyb
2019-03-18 12:54:10 +01:00
Mateusz Mikuła
9b7ff501a6
Replace most of ty:Ty with Ty
2019-03-18 12:54:10 +01:00
flip1995
4832a853c7
Feed dog
2019-03-16 15:39:02 +01:00
flip1995
180e07e99e
Adapt paths to new formatting
2019-03-16 15:22:31 +01:00
flip1995
3c4616d303
cargo fmt
2019-03-16 11:51:57 +01:00
flip1995
254fad95de
Use LocalInternedString inside of AbsolutePathPrinter
2019-03-16 11:45:29 +01:00
flip1995
dae5c9c685
AbsolutePathBuffer -> AbsolutePathPrinter
2019-03-16 11:17:36 +01:00
flip1995
31435cd7f5
Reimplement AbsolutePathBuffer
2019-03-15 23:42:46 +01:00
Alexander Regueiro
d2b85323ad
Addressed points raised in review.
2019-03-10 18:06:28 +00:00
Alexander Regueiro
d43966a176
Various cosmetic improvements.
2019-03-10 18:06:28 +00:00
bors
ccfbfb8097
Auto merge of #3860 - phansch:refactor_out_opt_def_id, r=flip1995
...
Refactor: Remove utils::opt_def_id
This removes some indirection. Probably this method was uplifted to
rustc at some point?
2019-03-09 12:05:41 +00:00
Philipp Krones
c32135a87f
Rollup merge of #3857 - phansch:document_path_qpath, r=flip1995
...
Document match_path, improve match_qpath docs
Inching towards enabling `#[deny(missing_docs)]` in utils 📜
2019-03-09 12:24:44 +01:00
Philipp Krones
1902384d15
Rollup merge of #3851 - phansch:refactor_trait_stuff, r=flip1995
...
Refactor: Extract `trait_ref_of_method` function
This pattern was used in three places after #3844 , so I think it's worth moving it into `utils/mod.rs` and documenting it.
2019-03-09 12:24:42 +01:00
Philipp Hansch
9d97ed6faa
Refactor: Remove utils::opt_def_id
...
This removes some indirection. Probably this method was uplifted to
rustc at some point?
2019-03-08 14:14:41 +01:00
Philipp Hansch
f04acdd463
Document match_path, improve match_qpath docs
2019-03-08 09:50:20 +01:00
Philipp Krones
837d675afd
Update clippy_lints/src/utils/mod.rs
...
Co-Authored-By: phansch <dev@phansch.net>
2019-03-08 09:40:12 +01:00
Philipp Hansch
65694cc6c8
Fix doctest
2019-03-08 09:10:41 +01:00
ljedrz
5d78250c75
align with rust-lang/rust/#58992
2019-03-07 21:51:05 +01:00
Philipp Hansch
e1d47cd5f1
Refactor: Extract trait_ref_of_method
function
2019-03-07 08:17:43 +01:00
ljedrz
f2587703cc
enable rust-lang/rust#58754
2019-03-01 19:10:14 +01:00
flip1995
1463d6f69f
Error an unknown or deprecated Clippy attribute
2019-02-28 16:44:42 +01:00
ljedrz
7bc2e1d60d
fix: replace wrong id
2019-02-25 11:06:46 +01:00
ljedrz
8dac8a6ba4
HirIdify some lints
2019-02-24 20:49:43 +01:00
Philipp Hansch
7d883cddbc
Extract diagnostics module and document some functions
...
This moves the lint building functions from `utils/mod.rs` to their own
`utils/diagnostics.rs` file. Also adds documentation for three of them.
2019-02-24 14:11:05 +01:00
Philipp Hansch
ff1b1a7c9f
Document some span_lint_*
util functions
2019-02-24 09:49:17 +01:00
bzzzz
7767b3a081
Fixed formatting and typo
2019-02-20 10:12:24 -08:00
bzzzz
f9c6682827
Make needless_range_loop not applicable to structures without iter method
2019-02-20 00:10:25 -08:00
flip1995
10811d5d89
Fix breakage from rust-lang/rust#58296
2019-02-14 14:01:43 +01:00
Grzegorz
16881390e1
removing redundant closures in the whole project
2019-02-10 13:35:44 +01:00
Hirokazu Hata
71dfbe2072
Use Hir::Def opt_def_id
2019-02-09 13:28:21 +09:00
Hirokazu Hata
66f8fa320b
Add new Def type ConstParam
2019-02-09 11:42:13 +09:00
bors
4259377ea6
Auto merge of #3725 - mikerite:fix-2728, r=phansch
...
Fix `cast_sign_loss` false positive
This checks if the value is a non-negative constant before linting about
losing the sign.
Because the `constant` function doesn't handle const functions, we check if
the value is from a call to a `max_value` function directly. A utility method
called `get_def_path` was added to make checking for the function paths
easier.
Fixes #2728
2019-02-04 05:52:44 +00:00
Michael Wright
f3ee53d225
Document get_def_path
2019-02-04 07:30:24 +02:00
Michael Wright
c02367c4e9
Fix breakage due to rust-lang/rust#58079
...
The rustc change added HirId to a few nodes. As I understand it, the plan is
to remove the NodeId from these nodes eventually. Where the NodeId was
not being matched, I used `..` to try and avoid further breakage. Where it
was, I used `_` to make the fix easier when NodeId is removed.
2019-02-03 09:12:07 +02:00
Michael Wright
3cf8c0b3b5
Fix cast_sign_loss
false positive
...
This checks if the value is a non-negative constant before linting about
losing the sign.
Because the `constant` function doesn't handle const functions, we check if
the value is from a call to a `max_value` function directly. A utility method
called `get_def_path` was added to make checking for the function paths
easier.
Fixes #2728
2019-01-31 06:32:29 +02:00
Philipp Hansch
d0d7c5e922
cargo fmt
2019-01-29 19:56:19 +01:00