Alexey Semenyuk
55b5c835c5
Changelog for Clippy 1.87
2025-05-12 14:50:27 +05:00
Samuel Tardieu
6509de3bfb
Fix situations identified by collapsible_if new hits
2025-03-25 19:50:24 +01:00
Samuel Tardieu
962329fd9d
Rename Sugg::maybe_par() into Sugg::maybe_paren()
...
"paren" is used throughout the Clippy codebase as an abbreviation for
"parentheses".
2025-03-24 08:44:54 +01:00
Alex Macleod
5b0004c45f
Migrate clippy_lints to new MSRV API
2025-02-28 18:15:11 +00:00
Samuel Tardieu
342ac8ee28
New lint: mem_replace_option_with_some
...
`mem::replace(opt, Some(v))` can be replaced by `opt.replace(v)`.
2025-02-12 19:57:14 +01:00
Samuel Tardieu
39bde6d46a
Reorganize code in mem_replace.rs
...
Make each lint be more self-contained, and trigger only the next lint
when the previous one didn't already rewrite the expression.
2025-02-12 17:16:37 +01:00
Nicholas Nethercote
d30f045fce
Convert two rustc_middle::lint functions to Span methods.
...
`rustc_middle` is a huge crate and it's always good to move stuff out of
it. There are lots of similar methods already on `Span`, so these two
functions, `in_external_macro` and `is_from_async_await`, fit right in.
The diff is big because `in_external_macro` is used a lot by clippy
lints.
2025-02-02 13:57:34 +11:00
Philipp Krones
d58b911e01
Merge commit ' ff4a26d442' into clippy-subtree-update
2024-11-28 19:38:59 +01:00
Philipp Krones
b61fcbee76
Merge commit ' 7901289135' into clippy-subtree-update
2024-09-24 11:58:04 +02:00
Philipp Krones
4e6851e50b
Merge commit ' 37f4fbb929' into clippy-subtree-update
2024-07-25 18:29:17 +02:00
Philipp Krones
0ae4a048c6
Merge commit ' 9725c4a162' into clippy-subtree-update
2024-04-04 19:52:55 +02:00
Philipp Krones
7be6e2178e
Merge commit ' 10136170fe' into clippy-subtree-update
2024-02-27 15:50:17 +01:00
Philipp Krones
798865c593
Merge commit ' 66c29b973b' into clippy-subtree-update
2024-01-25 19:17:36 +01:00
Philipp Krones
c9a43b18f1
Merge commit ' f0cdee4a3f' into clippy-subtree-sync
2023-12-01 18:21:58 +01:00
Philipp Krones
6246f0446a
Merge commit ' edb720b199' into clippyup
2023-11-16 19:13:24 +01:00
bors
2d9af160af
Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb
...
`rustc_span` cleanups
Just some things I found while looking over this crate.
r? `@oli-obk`
2023-11-03 14:57:40 +00:00
Philipp Krones
77c1e3aaa1
Merge commit ' 09ac14c901' into clippyup
2023-11-02 17:35:56 +01:00
Nicholas Nethercote
e1ec2d5cc9
Minimize pub usage in source_map.rs.
...
Most notably, this commit changes the `pub use crate::*;` in that file
to `use crate::*;`. This requires a lot of `use` items in other crates
to be adjusted, because everything defined within `rustc_span::*` was
also available via `rustc_span::source_map::*`, which is bizarre.
The commit also removes `SourceMap::span_to_relative_line_string`, which
is unused.
2023-11-02 19:35:00 +11:00
Philipp Krones
6b95029f17
Merge commit ' 83e42a2337' into clippyup
2023-04-11 15:31:08 +02:00
Philipp Krones
d05e2865a0
Merge commit ' d822110d3b' into clippyup
2022-12-01 18:29:38 +01:00
Philipp Krones
d75b25faab
Merge commit ' ac0e10aa68' into clippyup
2022-10-06 09:44:38 +02:00
Philipp Krones
dc29cfb8d5
Merge commit ' 2b2190cb56' into clippyup
2022-08-11 19:42:16 +02:00
xFrednet
4587b6628d
Merge 'rust-clippy/master' into clippyup
2022-05-21 13:24:00 +02:00
flip1995
35020280a0
Merge commit ' e329249b6a' into clippyup
2022-02-26 14:26:21 +01:00
Vadim Petrochenkov
aee89cdff1
Update clippy
2022-01-23 19:31:32 +08:00
flip1995
8fea1d94f3
Merge commit ' a5d597637d' into clippyup
2021-12-06 12:33:31 +01:00
flip1995
091ed44b50
Merge commit ' 27afd6ade4' into clippyup
2021-09-08 16:31:47 +02:00
flip1995
2b20f49841
Merge commit ' 0cce3f643b' into clippyup
2021-07-29 12:16:06 +02:00
flip1995
ae72f1adb9
Merge commit ' 7c7683c8ef' into clippyup
2021-04-27 16:55:11 +02:00
flip1995
02bf692169
Merge commit ' 98e2b9f25b' into clippyup
2021-04-22 11:31:13 +02:00
flip1995
f6d1f368db
Merge commit ' b40ea209e7' into clippyup
2021-04-08 17:50:13 +02:00
flip1995
9f6b5de7de
Merge commit ' 0e87918536' into clippyup
2021-03-25 19:29:11 +01:00
flip1995
f03edfd7a1
Merge commit ' 4911ab124c' into clippyup
2020-12-20 17:19:49 +01:00
Valentin Lazureanu
5a20489c5c
Rename TypeckTables to TypeckResults.
2020-07-17 08:47:04 +00:00
Eduard-Mihai Burtescu
30c046ede4
Use 'tcx for references to AccessLevels wherever possible.
2020-07-03 00:04:48 +03:00
Eduard-Mihai Burtescu
590e07bbc2
rustc_lint: avoid using TypeckTables::empty for LateContext.
2020-07-02 16:51:04 +03:00
Eduard-Mihai Burtescu
f5ce0e5fe9
rustc_lint: only query typeck_tables_of when a lint needs it.
2020-06-26 02:56:23 +03:00
flip1995
80bcbf521c
Merge commit ' c2c07fa9d0' into clippyup
2020-06-23 17:05:22 +02:00
xiongmao86
cf4e35339b
Add an Option<Span> argument to span_lint_and_help.
2020-04-18 18:28:29 +08:00
Philipp Hansch
870ae36f85
Cleanup: Rename 'db' variable to 'diag'
2020-04-17 08:08:00 +02:00
Philipp Hansch
79982a2813
Make use of some existing diagnostic items
2020-04-12 13:58:04 +02:00
Matthias Krüger
aff57e0f43
rustup https://github.com/rust-lang/rust/pull/70536
2020-03-30 11:17:58 +02:00
Yuki Okushi
f60f12f71f
Rename span_help_and_lint to span_lint_and_help
2020-01-27 11:17:58 +09: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
2f2eaf8b7e
Rustup to rust-lang/rust#67886
2020-01-07 01:46:33 +09:00
Philipp Hansch
c5178e82b4
Rustup to https://github.com/rust-lang/rust/pull/67853
...
Specifically caused by https://github.com/rust-lang/rust/pull/67786
2020-01-04 11:30:03 +01:00
Krishna Veera Reddy
42e4595d3a
Indicate anonymous lifetimes for types
2019-12-31 09:22:35 -08:00
Krishna Veera Reddy
c09e79e226
Lint within internal macros without a suggestion
2019-12-31 09:22:35 -08:00
Krishna Veera Reddy
aa66f760c3
Destructure mem:replace arguments
2019-12-31 09:22:35 -08:00