Commit Graph

1435 Commits

Author SHA1 Message Date
Philipp Krones 181601c342 Merge remote-tracking branch 'upstream/master' into rustup 2025-11-28 20:09:43 +01:00
Mads Marquart 2fc8d717c5 Simplify jemalloc setup
Using the new `override_allocator_on_supported_platforms` feature in
`tikv-jemalloc-sys v0.6.1` we can avoid the manual statics.
2025-11-23 10:44:13 +01:00
Philipp Krones 03cd6b6dd8 Merge remote-tracking branch 'upstream/master' into rustup 2025-11-15 00:37:39 +01:00
Jakub Beránek a200679d96 Revert "Rollup merge of #146627 - madsmtm:jemalloc-simplify, r=jdonszelmann"
This reverts commit 5dc3c19417, reversing
changes made to 11339a0ef5.
2025-11-13 10:29:26 +01:00
Mads Marquart a72893f708 Simplify jemalloc setup
Using the new `override_allocator_on_supported_platforms` feature in
`tikv-jemalloc-sys v0.6.1` we can avoid the manual statics.
2025-11-11 20:16:15 +01:00
Jakub Beránek ce0c449237 Generalize branch references to HEAD 2025-11-02 11:15:55 +01:00
Philipp Krones 8f61305722 Merge commit 'd9fb15c4b1ebe9e7dc419e07f53af681d7860cbe' into clippy-subtree-update 2025-10-16 20:38:28 +02:00
Nick Drozd 5318883d75 Use expect for lint warnings 2025-10-06 20:17:12 -04:00
Philipp Krones 9b0611ff7a Merge commit 'e9b70454e4c9584be3b22ddabd26b741aeb06c10' into clippy-subtree-update 2025-09-04 18:27:27 -04:00
Lieselotte a165008534 Allow --print=crate-root-lint-levels 2025-08-26 18:42:26 +02:00
Philipp Krones 074ccaf3c0 Merge commit 'c5dbd1de07e0407b9687619a868384d6de06253f' into clippy-subtree-update 2025-06-27 12:20:57 +02:00
Philipp Krones 90364dd178 Merge remote-tracking branch 'upstream/master' into rustup 2025-06-26 19:29:33 +02:00
Samuel Tardieu 7c828e63ba or_fun_call: lint more methods (#15071)
Extend `or_fun_call` lint with new checks for Option::get_or_insert,
Result::map_or.

changelog: [`or_fun_call`]: lint more methods
2025-06-21 09:21:42 +00:00
Jason Newcomb acd8810e77 Prepare to split lints into multiple crates
* Move `declare_clippy_lint` to it's own crate
* Move lint/group registration into the driver
* Make `dev update_lints` handle multiple lint crates
2025-06-18 22:37:23 -04:00
klensy 9ed1843653 dogfood clippy::or_fun_call 2025-06-17 15:42:54 +03:00
Jakub Beránek dd0fa3d356 Add jemalloc feature to Clippy 2025-06-10 11:09:54 +02:00
Philipp Krones 7debaf6b44 Merge commit 'cadf98bb7d783e2ea3572446c3f80d3592ec5f86' into clippy-subtree-update 2025-05-21 15:15:38 +02:00
Samuel Tardieu db42c7dddc Remove obsolete restriction in code 2025-05-19 17:50:22 +02:00
Philipp Krones 93bd4d8931 Merge commit '0450db33a5d8587f7c1d4b6d233dac963605766b' into clippy-subtree-update 2025-05-15 19:28:39 +02:00
Alex Macleod 737d3b3363 Remove some unused #![feature]s 2025-05-06 14:07:39 +00:00
Philipp Krones ff428d91c2 Merge commit '0621446356e20fd2ead13a6763bb936c95eb0cfa' into clippy-subtree-update 2025-04-22 18:24:43 +02:00
Alex Macleod b52bd96713 Replace interning of string literals with preinterned symbols 2025-04-18 22:44:16 +00:00
Timo 781fdab9a9 Move internal lints to their own crate (#13223)
This makes it so switching the internal feature on/off no longer
rebuilds `clippy_lints`.

r? @flip1995

changelog: none
2025-04-18 12:04:08 +00:00
Philipp Krones de90fa42dd Merge remote-tracking branch 'upstream/master' into rustup 2025-04-17 18:36:59 +02:00
Jason Newcomb 5b4b463d49 Move internal lints to their own crate 2025-04-12 17:53:36 -04:00
Alex Macleod 94ec23934c Allow drivers to supply a list of extra symbols to intern 2025-04-10 13:39:23 +00:00
Samuel Tardieu 79c69112dc Apply collapsible_if to Clippy itself
Since Clippy uses the `let_chains` feature, there are many occasions to
collapse `if` and `if let` statements.
2025-03-27 14:40:44 +01:00
bjorn3 abdee777c2 Some cleanups around EarlyDiagCtxt
All callers of EarlyDiagCtxt::early_error now emit a fatal error.
2025-02-02 16:06:43 +00:00
Bastian Kersting 27454db7d1 Insert null checks for pointer dereferences when debug assertions are enabled
Similar to how the alignment is already checked, this adds a check
for null pointer dereferences in debug mode. It is implemented similarly
to the alignment check as a MirPass.

This is related to a 2025H1 project goal for better UB checks in debug
mode: https://github.com/rust-lang/rust-project-goals/pull/177.
2025-01-31 11:13:34 +00:00
Philipp Krones 9da9ddb7db Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into clippy-subtree-update 2025-01-28 19:33:54 +01:00
bjorn3 d7b39401dd Remove RunCompiler
It has become nothing other than a wrapper around run_compiler.
2025-01-23 09:38:58 +00:00
bjorn3 1da4eb3f8b Remove the need to manually call set_using_internal_features 2025-01-23 09:38:58 +00:00
Philipp Krones 1cc50519d1 Merge commit '609cd310be44677ae31d452a17b0f8207e1abfe1' into clippy-subtree-update 2024-12-26 15:15:54 +01:00
bjorn3 63e4979399 Remove all threading through of ErrorGuaranteed from the driver
It was inconsistently done (sometimes even within a single function) and
most of the rest of the compiler uses fatal errors instead, which need
to be caught using catch_with_exit_code anyway. Using fatal errors
instead of ErrorGuaranteed everywhere in the driver simplifies things a
bit.
2024-12-06 18:42:31 +00:00
Philipp Krones 277c4e4baf Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into clippy-subtree-update 2024-10-03 16:32:51 +02:00
Philipp Krones b61fcbee76 Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into clippy-subtree-update 2024-09-24 11:58:04 +02:00
John Kåre Alsaker 837d9045c5 Link std statically in rustc_driver 2024-08-11 04:16:53 +02:00
Philipp Krones 1ac76a2062 Merge commit 'cb806113e0f83a8f9b47d35b453b676543bcc40e' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
Mark Rousskov 5faea65d4d step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
xFrednet 1b4c281fe7 RFC 2383: Stabilize lint_reasons in Clippy 🖇️ 2024-06-25 17:50:48 +02:00
Oli Scherer 4b7ae63fbf Use a dedicated type instead of a reference for the diagnostic context
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
2024-06-18 15:42:11 +00:00
Peter Jaszkowiak a456300af5 Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00
The Miri Cronjob Bot 55b757ee3c Merge from rustc 2024-03-08 05:17:07 +00:00
Philipp Krones 7e83df4068 Merge commit '93f0a9a91f58c9b2153868f458402155fb6265bb' into clippy-subtree-update 2024-03-07 17:19:29 +01:00
beetrees 865ac89dbd Use rustc_driver::args::raw_args() in Clippy 2024-03-07 00:20:01 +00:00
Nicholas Nethercote b74b4b09d1 Rename all ParseSess variables/fields/lifetimes as psess.
Existing names for values of this type are `sess`, `parse_sess`,
`parse_session`, and `ps`. `sess` is particularly annoying because
that's also used for `Session` values, which are often co-located, and
it can be difficult to know which type a value named `sess` refers to.
(That annoyance is the main motivation for this change.) `psess` is nice
and short, which is good for a name used this much.

The commit also renames some `parse_sess_created` values as
`psess_created`.
2024-03-05 08:11:45 +11:00
Philipp Krones 7be6e2178e Merge commit '10136170fe9ed01e46aeb4f4479175b79eb0e3c7' into clippy-subtree-update 2024-02-27 15:50:17 +01:00
surechen d88ad9e6b7 By tracking import use types to check whether it is scope uses or the other situations like module-relative uses, we can do more accurate redundant import checking.
fixes #117448

For example unnecessary imports in std::prelude that can be eliminated:

```rust
use std::option::Option::Some;//~ WARNING the item `Some` is imported redundantly
use std::option::Option::None; //~ WARNING the item `None` is imported redundantly
```
2024-02-18 16:38:11 +08:00
Matthias Krüger 8f00ffc901 Rollup merge of #120806 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-02-09 19:21:17 +01:00
Philipp Krones f3b3d23416 Merge commit '60cb29c5e4f9772685c9873752196725c946a849' into clippyup 2024-02-08 20:24:42 +01:00