Kyle Matsuda
afa28e6304
change usages of explicit_item_bounds to bound_explicit_item_bounds
2023-04-20 12:36:50 -06:00
Caio
0b16f80c40
[arithmetic_side_effects] Cache symbols
2023-04-20 14:59:02 -03:00
Camille GILLOT
8ead58c67b
Remove WithOptconstParam.
2023-04-20 17:48:32 +00:00
bors
06dace2920
Auto merge of #10669 - oli-obk:@, r=Alexendoo
...
Update to a compiletest-rs version that requires `//@` for commands
Requires https://github.com/Manishearth/compiletest-rs/pull/261 to get published
This PR is a smaller step towards https://github.com/rust-lang/rust-clippy/pull/10426
changelog: Move to a version of compiletest-rs that allows us to require `//`@`` for test suite commands.
2023-04-20 14:51:33 +00:00
Oli Scherer
def1705a27
Update to a compiletest-rs version that requires //@ for commands
2023-04-20 14:44:03 +00:00
bors
523c8fa2ed
Auto merge of #10615 - c410-f3r:bbbbbbbbbbb, r=giraffate
...
[arithmetic_side_effects] Fix #10590
Fix #10590
changelog: [`arithmetic_side_effects`]: Detect integer methods that can introduce side effects
2023-04-20 13:27:22 +00:00
Centri3
41f6d88be5
make cargo test pass
2023-04-19 21:51:58 -05:00
Centri3
a3aeec4f75
config instead of new lint and don't panic
2023-04-19 21:46:13 -05:00
Lukas Lueg
2745c87842
Dont suggest suboptimal_flops unavailable in nostd
...
Fixes #10634
2023-04-19 20:04:17 +02:00
bors
4d35b5e27b
Auto merge of #10668 - xFrednet:changelog-1-69, r=flip1995
...
Changelog for Rust 1.69 🌸
Roses are blue,
Violets are red,
Something is wrong,
We still commit!
---
changelog: none
2023-04-19 17:24:44 +00:00
Caio
3db7352b81
[arithmetic_side_effects] Fix #10590
2023-04-19 10:58:00 -03:00
bors
f1a552ccec
Auto merge of #10203 - c410-f3r:macro-lint, r=giraffate
...
Suppress the triggering of some lints in derived structures
Fixes #10185
Fixes #10417
For `integer_arithmetic`, `arithmetic_side_effects` and `shadow_reuse`.
* ~~Not sure how to test these use-cases so feel free to point any method or any related PR.~~
---
changelog: FP: [`integer_arithmetic`], [`arithmetic_side_effects`]: No longer lint inside proc macros
[#10203 ](https://github.com/rust-lang/rust-clippy/pull/10203 )
<!-- changelog_checked -->
2023-04-19 12:56:19 +00:00
xFrednet
747ff0656b
Update version attribute for 1.69 lints
2023-04-19 14:55:18 +02:00
bors
0c44586ff7
Auto merge of #10651 - lukaslueg:issue10641, r=xFrednet
...
Add size-parameter to unecessary_box_returns
Fixes #10641
This adds a configuration-knob to the `unecessary_box_returns`-lint which allows _not_ linting a `fn() -> Box<T>` if `T` is "large". The default byte size above which we no longer lint is 128 bytes (due to https://github.com/rust-lang/rust-clippy/issues/4652#issue-505670554 , also used in #9373 ). The overall rational is given in #10641 .
---
changelog: Enhancement: [`unnecessary_box_returns`]: Added new lint configuration `unnecessary-box-size` to set the maximum size of `T` in `Box<T>` to be linted
[#10651 ](https://github.com/rust-lang/rust-clippy/pull/10651 )
<!-- changelog_checked -->
2023-04-19 12:42:33 +00:00
Lukas Lueg
4bc68f9c60
Add size-parameter to unecessary_box_returns
...
Fixes #10641
2023-04-19 14:32:05 +02:00
Alex Macleod
2f4f798f9b
Ignore manual_slice_size_calculation in code from macro expansions
2023-04-18 17:54:26 +00:00
Centri3
fa1efa8b10
refactor
2023-04-17 20:57:56 -05:00
timvisee
a2580db642
Use clippy_utils::std_or_core in manual slice size calculation lint
2023-04-17 21:19:49 +02:00
timvisee
b8fee8b504
Add run-rustfix marker and test file
2023-04-17 21:19:44 +02:00
timvisee
503fd56a42
Suggest applicable expression for manual slice size calculation lint
2023-04-17 20:31:25 +02:00
timvisee
4fb38cfb29
Rename std::mem::size_of_value to std::mem::size_of_val
2023-04-17 18:02:04 +02:00
Centri3
80707aa95f
improve description a bit
2023-04-17 00:37:43 -05:00
Centri3
a57445d4d6
make cargo test pass, again
2023-04-16 23:59:31 -05:00
Centri3
a7c3301b58
refactor
2023-04-16 23:56:21 -05:00
Centri3
dfccebe3e0
make cargo test pass
2023-04-16 23:36:01 -05:00
Centri3
0a81f8257e
add semicolon_outside_block_if_singleline lint
2023-04-16 23:30:00 -05:00
Nilstrieb
8f53926232
Alloc hir::Lit in an arena to remove the destructor from Expr
...
This allows allocating `Expr`s into a dropless arena, which is useful
for using length prefixed thing slices in HIR, since these can only be
allocated in the dropless arena and not in a typed arena. This is
something I'm working on.
2023-04-16 15:35:51 +00:00
Caio
d6390625dc
Address comments
2023-04-15 16:05:46 -03:00
Manish Goregaokar
b2edd42b24
Merge pull request #10603 from robertbastian/octal
...
Fix false positives and false negatives in `octal_escapes`
2023-04-13 15:50:00 -07:00
bors
d9c2957221
Auto merge of #10629 - Alexendoo:as-ptr-cast-mut-docs-ub, r=Jarcho
...
Fix UB in `as_ptr_cast_mut` documentation
changelog: none
Fixes #10628
There's no `String::as_mut_ptr` surprisingly, so the example is actually calling `str::as_mut_ptr` on an empty `str`
2023-04-12 16:47:34 +00:00
bluthej
6409556926
Standardize lint formulation
2023-04-12 13:48:03 +02:00
Philipp Krones
6b95029f17
Merge commit ' 83e42a2337' into clippyup
2023-04-11 15:31:08 +02:00
Alex Macleod
8f979af3d1
Fix UB in as_ptr_cast_mut documentation
2023-04-11 11:17:18 +00:00
Michael Schubart
008ba7326b
Ignore fake read access
2023-04-11 10:32:09 +09:00
Michael Schubart
63030acf4f
Refactor
2023-04-11 10:27:32 +09:00
bors
5ec2e192f5
Auto merge of #10614 - bluthej:clear-with-drain, r=Manishearth
...
Clear with drain
Fixes #10572 : both the original intent of the issue (extending `clear_with_drain`) and the false negative for `collection_is_never_read` I found in the process are fixed by this PR.
changelog: [`clear_with_drain`]: extend to 5 other types of containers. [`collection_is_never_read`]: fix false negative for `String`s.
2023-04-11 00:29:21 +00:00
bors
e22019d0b7
Auto merge of #10593 - feniljain:fix-needless-return, r=xFrednet
...
fix(needless_return): do not trigger on ambiguous match arms return
If we see a case where match returns something other than `()`, we just skip `needless_return` lint in that case
Should fix #10546
Relevant Zulip Discussion: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Issue.20.2310546
---
changelog: FP: [`needless_return`]: No longer lints match statements with incompatible branches
[#10593 ](https://github.com/rust-lang/rust-clippy/pull/10593 )
<!-- changelog_checked -->
2023-04-10 21:52:47 +00:00
bors
4904d754e0
Auto merge of #10624 - the8472:remove-drain-filter-feature, r=xFrednet
...
remove unusued `#![feature(drain_filter)]`
The unstable feature does not appear to be used and its presence blocks work in https://github.com/rust-lang/rust/pull/104455
changelog: none
2023-04-10 12:55:50 +00:00
The 8472
d6fe73db3f
remove unusued feature
2023-04-10 13:13:09 +02:00
Kisaragi
ba1f19ee30
apply code review suggestion
...
Co-authored-by: llogiq <bogusandre@gmail.com>
2023-04-10 01:31:30 +09:00
Kisaragi
5109a8a840
[missing_const_for_fn] fix #7121
2023-04-10 00:55:32 +09:00
bluthej
d8f0a96ba2
Merge branch 'rust-lang:master' into clear-with-drain
2023-04-09 13:40:52 +02:00
bluthej
7852962820
Change format! style to please dogfood test
2023-04-09 13:37:02 +02:00
bluthej
423b54ac12
Update documentation for clear_with_drain
...
The specific type `Vec` is replaced with the generic term 'container'
2023-04-09 13:29:27 +02:00
bluthej
32aa07f832
Fix false negative for Strings
...
`String` is not a diagnostic item and was thus not picked up by
`is_type_diagnostic_item`, leading to a false negative for
`collection_is_never_read`
2023-04-09 13:25:50 +02:00
Caio
cd0009eb30
Suppress the triggering of some lints in derived structures
2023-04-09 08:16:20 -03:00
bluthej
5b57e5cec8
Fix false negative with String and add tests
...
`String` is currently not a diagnostic item so it needs special
treatment
2023-04-09 12:33:20 +02:00
bluthej
9ec542873c
Add 5 other container types and start testing
2023-04-07 16:07:43 +02:00
y21
5d01e6e96c
new lint: suspicious_doc_comments
2023-04-07 12:04:55 +02:00
bors
b8cbce8e6a
Auto merge of #10601 - schubart:manual_slice_size_calculation, r=llogiq
...
Add [`manual_slice_size_calculation`]
Fixes : #10518
---
changelog: new lint [`manual_slice_size_calculation`]
2023-04-07 07:39:11 +00:00