Commit Graph

62 Commits

Author SHA1 Message Date
Philipp Krones
d140e26cc0
Merge remote-tracking branch 'upstream/master' into rustup 2024-09-22 20:51:17 +02:00
Ruairidh Williamson
05ebce8e1a
Add lint unused_trait_names 2024-09-21 00:56:38 +01:00
Folkert de Vries
b5ea5c23b3 stabilize const_extern_fn 2024-09-14 18:07:06 +02:00
Trevor Spiteri
7cccef84cf handle transmutes in const context if msrvs::CONST_FLOAT_BITS_CONV 2024-09-13 13:57:41 +02:00
Artem Belyakov
9415e6e6eb Add manual_div_ceil 2024-09-06 00:55:42 +02:00
Philipp Krones
40fca8f7a8
Bump Clippy version -> 0.1.83 2024-09-05 17:00:55 +02:00
bors
ac914d3457 Auto merge of #12476 - GuillaumeGomez:add-manual_arithmetic_check, r=y21
Extend `implicit_saturating_sub` lint

Fixes #10070.

It can serve as base if we want to add equivalent checks for other arithmetic operations.

Also one important note: when writing this lint, I realized that I could check for wrong conditions performed beforehand on subtraction and added another part in the lint. Considering they both rely on the same checks, I kept both in the same place. Not sure if it makes sense though...

changelog: Extend `implicit_saturating_sub` lint
2024-08-31 16:03:42 +00:00
Guillaume Gomez
e845366c82 Add MSRV check for saturating_sub lints in const contexts 2024-08-31 16:24:17 +02:00
Jason Newcomb
173d5a6af0 Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyup 2024-08-24 18:33:44 -04:00
kyoto7250
1958e1acd4 fix false position in explicit_iter_loop with msrv 2024-08-20 01:51:32 +09:00
Alex Macleod
a22ce2d005 Remove HashSets from Conf 2024-08-12 20:24:47 +00:00
Alex Macleod
b32a0176fa Replace rustc_semver with rustc_session::RustcVersion 2024-08-09 13:00:24 +00:00
Philipp Krones
1ac76a2062 Merge commit 'cb806113e0f83a8f9b47d35b453b676543bcc40e' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
Jason Newcomb
4e57b2c46f Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
bors
ea06fa326d Auto merge of #13177 - GuillaumeGomez:fix-broken-list-lints-config, r=xFrednet
Fix broken list for lints config

Follow-up of #13166.

Finally figured out that it was a transformation and not the source that was the problem. It now looks like this:

![Screenshot from 2024-07-29 16-29-10](https://github.com/user-attachments/assets/4b89b3fe-8f85-47b8-8d9a-505badeaeac4)

r? `@xFrednet`

changelog: none
2024-07-31 11:11:39 +00:00
Guillaume Gomez
712e8f4f48 Fix broken list for lints config 2024-07-29 16:30:59 +02:00
bors
3b64ca95a9 Auto merge of #13173 - Jarcho:conf_order, r=xFrednet
Misc changes to `clippy_config`

Contains part of #13084

Changes include:
* Sort config list and each configs lint list.
* Add default text for the two configs that were missing it.
* Switch the lint list in the configs to an attribute.
* Make `dev fmt` sort the config list.

r? `@xFrednet`

changelog: none
2024-07-29 13:19:01 +00:00
Jason Newcomb
1d06ad5599 Mark the lints for each config via an attribute instead of a doc comment.. 2024-07-28 00:55:46 -04:00
Jason Newcomb
7422202ca5 Add missing default values 2024-07-27 23:34:16 -04:00
Jason Newcomb
7a25ead416 Remove unneeded parens in config macro 2024-07-27 19:23:23 -04:00
Jason Newcomb
84dc56923b Add docs for await_holding_invalid_types 2024-07-27 18:17:26 -04:00
Jason Newcomb
a54e3130ca alphabetize the config fields 2024-07-27 18:10:56 -04:00
Guillaume Gomez
b5fa6e28d4 Fix display of configs in clippy doc page 2024-07-26 14:23:46 +02:00
Philipp Krones
4e6851e50b Merge commit '37f4fbb92913586b73a35772efd00eccd1cbbe13' into clippy-subtree-update 2024-07-25 18:29:17 +02:00
Philipp Krones
71b0f0fcac
Bump Clippy version -> 0.1.82 2024-07-25 18:23:37 +02:00
xFrednet
e34db99b2e
Update version attribute for 1.80 lints 2024-07-18 20:13:39 +02:00
Jason Newcomb
e34c6dbae5 Refactor for using config values:
* Construct lint passes by taking `Conf` by reference.
* Use `HashSet` configs in less places
* Move some `check_crate` code into the pass constructor when possible.
2024-07-17 14:05:49 -04:00
Bruce Mitchener
39378cf4f4 Add more doc-valid-idents
* "AccessKit" is a commonly used accessibility toolkit used in Rust GUIs.
* "CoreFoundation", "CoreGraphics", "CoreText" are frameworks on Apple OSes.
* "Direct2D", "Direct3D", "DirectWrite" are frameworks on Windows
* "PostScript" is a programming language and is mentioned when talking about
  text and vector graphics.
* "OpenAL" is an audio framework / API.
* "OpenType" is a font format (TrueType is already mentioned).
* "WebRTC", "WebSocket", "WebTransport" are web networking technologies.
* "NetBSD" and "OpenBSD" are like the already included FreeBSD.
2024-07-13 15:50:29 +07:00
Philipp Krones
c1fd25d0aa Merge commit 'b794b8e08c16517a941dc598bb1483e8e12a8592' into clippy-subtree-update 2024-07-11 15:44:03 +02:00
Alexey Semenyuk
6621e6cbfa Rename thread_local_initializer_can_be_made_const to missing_const_for_thread_local 2024-07-05 19:40:37 +05:00
J-ZhengLi
3a71223812 [missing_const_for_fn]: fix suggestions for fn with abi that requires const_extern_fn feature 2024-07-04 15:56:11 +08:00
Philipp Krones
2da0edbdf1
Honor avoid-breaking-exported-api in needless_pass_by_ref_mut
Until now, the lint only emitted a warning, when breaking public API. Now it
doesn't lint at all when the config value is not set to `false`, bringing it in
line with the other lints using this config value.

Also ensures that this config value is documented in the lint.
2024-07-02 19:30:01 +02:00
Kornel
eb33c1ac74
Image-related valid idents 2024-06-29 12:18:09 +01:00
Philipp Krones
abdd057163 Merge commit '68a799aea9b65e2444fbecfe32217ce7d5a3604f' into clippy-subtree-update 2024-06-27 18:56:04 +02:00
Philipp Krones
e9e7a815a7
Merge remote-tracking branch 'upstream/master' into rustup 2024-06-27 18:49:59 +02:00
Reilly Tucker Siemens
80b25b4c82
Fix doc_markdown DevOps false positive 2024-06-26 15:22:38 -07:00
xFrednet
1b4c281fe7 RFC 2383: Stabilize lint_reasons in Clippy 🖇️ 2024-06-25 17:50:48 +02:00
Jason Newcomb
22710f33a8 Add lint manual_inspect 2024-06-16 18:33:43 -04:00
AurelienFT
63388cbab8 add MSRV for manual_pattern_char_comparison 2024-06-15 21:45:35 +02:00
Philipp Krones
3bff119f63 Merge commit '3e5a02b13b1244545454752c6629b767522a44b1' into clippy-subtree-update 2024-06-13 12:30:48 +02:00
Philipp Krones
614966b0c3
Bump Clippy version -> 0.1.81 2024-06-13 12:24:14 +02:00
Philipp Krones
4363278c73 Merge commit '2efebd2f0c03dabbe5c3ad7b4ebfbd99238d1fb2' into clippy-subtree-update 2024-05-21 10:39:30 -07:00
Philipp Krones
80c6f8ff7b Merge commit '20b085d500dfba5afe0869707bf357af3afe20be' into clippy-subtree-update 2024-05-02 17:26:44 +02:00
Philipp Krones
a5aaf33422 Merge commit 'ca3b393750ee8d870bf3215dcf6509cafa5c0445' into clippy-subtree-update 2024-04-18 17:48:52 +02:00
Philipp Krones
0ae4a048c6 Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
Alex Macleod
733c7af87f Rename {enter,exit}_lint_attrs to check_attributes{,_post} 2024-03-24 14:57:57 +00:00
Philipp Krones
0e62b18435 Merge commit '9d6f41691ed9dbfaec2a2df2661c42451f2fe0d3' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
Philipp Krones
7e83df4068 Merge commit '93f0a9a91f58c9b2153868f458402155fb6265bb' into clippy-subtree-update 2024-03-07 17:19:29 +01:00
Nicholas Nethercote
7a7224ee33 Remove the UntranslatableDiagnosticTrivial lint.
It's a specialized form of the `UntranslatableDiagnostic` lint that is
deny-by-default.

Now that `UntranslatableDiagnostic` has been changed from
allow-by-default to deny-by-default, the trivial variant is no longer
needed.
2024-02-28 10:53:04 +11:00
Philipp Krones
7be6e2178e Merge commit '10136170fe9ed01e46aeb4f4479175b79eb0e3c7' into clippy-subtree-update 2024-02-27 15:50:17 +01:00