Jason Newcomb
12fce55766
Fix all occurences of needless_borrow
internally
2021-04-06 10:43:47 -04:00
Cameron Steffen
0743e841f0
Don't re-export clippy_utils::*
2021-03-17 09:13:52 -05:00
Cameron Steffen
1c3a3e7dc6
Don't re-export clippy_utils::diagnostics::*
2021-03-15 20:06:01 -05:00
Cameron Steffen
eb7f8d6089
Move some utils to ty_utils
2021-03-15 13:44:09 -05:00
Camille GILLOT
476c5283d5
Do not store attrs in FnKind.
2021-03-09 19:09:33 +01:00
flip1995
f03edfd7a1
Merge commit '4911ab124c481430672a3833b37075e6435ec34d' into clippyup
2020-12-20 17:19:49 +01:00
flip1995
fbf2430f02
Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup
2020-10-09 12:45:29 +02:00
Dylan MacKenzie
29d43f63bd
clippy: (Body, DefId)
-> Body
2020-10-04 16:07:03 -07:00
Oliver Scherer
a6fda14394
Move qualify_min_const_fn
out of rustc into clippy
2020-09-26 16:08:24 +02:00
flip1995
d164ab65f7
Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyup
2020-07-26 21:07:07 +02:00
Eduard-Mihai Burtescu
30c046ede4
Use 'tcx for references to AccessLevels wherever possible.
2020-07-03 00:04:48 +03:00
flip1995
a0e9f9bd0d
Merge commit '7ea7cd165ad6705603852771bf82cc2fd6560db5' into clippyup2
2020-05-28 15:45:24 +02:00
Matthias Krüger
f9c1acbc45
rustup https://github.com/rust-lang/rust/pull/71215/
2020-04-24 15:29:31 +02:00
Matthias Krüger
aff57e0f43
rustup https://github.com/rust-lang/rust/pull/70536
2020-03-30 11:17:58 +02:00
Philipp Hansch
cec1e8f74e
Remove dependency on matches
crate
...
The std equivalent works exactly the same.
2020-03-25 07:50:08 +01:00
Shotaro Yamada
a3d9355bef
Fix ICE with trivial_bounds feature
2020-03-10 13:17:35 +09:00
Krishna Sai Veera Reddy
049079856b
Prevent missing_const_for_fn
on functions with const generic params
...
`const` functions cannot have const generic parameters so prevent the
`missing_const_for_fn` lint from firing in that case.
2020-02-21 19:56:44 -08:00
Yuki Okushi
ce1c6b285d
Rustup to rust-lang/rust#68045
2020-01-13 21:55:57 +09:00
Yuki Okushi
39947992b5
Rustup to rust-lang/rust#67806
2020-01-11 21:50:00 +09:00
Yuki Okushi
e58cfac458
Rustup to rust-lang/rust#67979
2020-01-09 16:43:51 +09:00
Yuki Okushi
c24251b5fd
Rustup to rust-lang/rust#67781
2020-01-09 09:22:16 +09:00
Yuki Okushi
f7a93f029c
Apply suggestion from code review
2020-01-07 18:38:12 +09:00
Yuki Okushi
5ac08b0cc9
Normalize lint messages
2020-01-07 18:26:55 +09:00
Yuki Okushi
2f2eaf8b7e
Rustup to rust-lang/rust#67886
2020-01-07 01:46:33 +09:00
Yuki Okushi
9086b17e14
Rustup to rust-lang/rust#67707
2019-12-31 09:17:56 +09:00
Yuki Okushi
a4c201e6b4
Rustup to rust-lang/rust#66942
2019-12-30 13:02:10 +09:00
flip1995
9632e27487
Add <'_> where necessary
2019-12-22 15:42:41 +01:00
Matthias Krüger
98e433d70d
Rustup to rust-lang/rust#66878
2019-12-04 01:34:01 +01:00
Andre Bogus
cc622608db
new lints around #[must_use]
fns
...
`must_use_unit` lints unit-returning functions with a `#[must_use]`
attribute, suggesting to remove it.
`double_must_use` lints functions with a plain `#[must_use]`
attribute, but which return a type which is already `#[must_use]`,
so the attribute has no benefit.
`must_use_candidate` is a pedantic lint that lints functions and
methods that return some non-unit type that is not already
`#[must_use]` and suggests to add the annotation.
2019-10-14 12:09:04 +02:00
Philipp Hansch
1b18597554
Fix missing_const_for_fn false positive
...
We don't want to lint if any of the input parameters implement drop.
(constant functions cannot evaluate destructors)
2019-08-29 08:07:41 +02:00
Philipp Hansch
2f48effc92
Doctests: Enable running doc tests for nursery lints
2019-08-03 21:01:23 +02:00
Lzu Tao
7293defb34
Rename hir::map::local_def_id_from_hir_id to local_def_id
2019-07-06 10:52:51 +07:00
Matthew Kraai
753c39672e
Use lint pass macros
...
Fixes #3917 .
2019-04-17 09:35:22 -07:00
Philipp Hansch
e1d47cd5f1
Refactor: Extract trait_ref_of_method
function
2019-03-07 08:17:43 +01:00
Andy Russell
fe96ffeac9
move lint documentation into macro invocations
2019-03-05 18:45:08 -05:00
Philipp Hansch
15cba2e956
Fix missing_const_for_fn for impl trait methods
2019-03-05 08:11:55 +01:00
Philipp Hansch
b87f5bc55a
Don't trigger missing_const_for_fn in external macros
...
As reported in #3841 . Only fixes the part where it triggers on the
`derive`.
2019-03-04 22:56:33 +01:00
ljedrz
1fac380886
partially HirIdify lints
2019-02-20 13:16:16 +01:00
Philipp Hansch
d0d7c5e922
cargo fmt
2019-01-29 19:56:19 +01:00
Philipp Hansch
aed001b8d4
Update various docs
...
* `const_transmute` currently also seems to depend on the `const_fn`
feature.
* Only `Sized` is currently allowed as a bound, not Copy.
2019-01-29 08:19:05 +01:00
Philipp Hansch
0c6bdda562
Use built-in entry_fn detection over self-built
2019-01-29 08:19:05 +01:00
Philipp Hansch
c0a02691d8
cargo fmt
2019-01-29 08:19:05 +01:00
Philipp Hansch
f9d65b6356
Reorganize conditionals: Run faster checks first
2019-01-29 08:19:05 +01:00
Philipp Hansch
68cc4df551
Maybe fix ICE?
2019-01-29 08:19:05 +01:00
Philipp Hansch
c3980bf0bc
Add initial version of const_fn lint
2019-01-29 08:19:05 +01:00